[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /sbin/reboot: symbolic link to `halt'



On 2009-08-16 22:36 +0200, Chris Bannister wrote:

> I noticed that /sbin/reboot is a symbolic link to /sbin/halt. How does
> the system "know" the difference? 

The program notices how it is called and behaves accordingly.  Programs
written in C can get information about their name in argv[0].

Sven


Reply to: