From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199710031610.MAA13808@pongo.cv.nrao.edu> Date: Fri, 3 Oct 1997 12:10:17 -0400 (EDT) From: Robert L. Millner Subject: Re: argv[] to /sbin/loader This time, with a clue (what I get for not exercising the C wheels in my head for a year). In case none of what I am saying makes sense: $ ./a.out -n 1000 & $ sleep(10) $ ps PID TTY STAT TIME COMMAND 666 1 R 0:10 loader -n 1000 "RLM" == Robert L Millner writes: RLM> loader, a.out, (loader, -n, 1000), (ENV1, ENV2, ...) I was trying to abstract the guts of the code in exec.c into a pseudo call which doesn't really make sense with how exec.c works. Either way, the original argv[0] is getting zorched and loader is treating it like it is still there. RLM> loader, a.out, (a.out, -n, 1000), (ENV1, ENV2, ...) More correctly, under DU, the call to exec_with_loader looks like (once again using abstractions): (/sbin/loader, ./a.out, [a.out, -n, 1000], [ENV1, ENV2]) which probably exec's loader with: (/sbin/loader, [a.out, ./a.out , -n, 1000], [ENV1, ENV2]) loader then moves the program's name off argv and exec's a.out with: (./a.out, [a.out, -n, 1000], [ENV1, ENV2]). -Rob -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com