From: Robert L. Millner <rmillner@nrao.edu>
Subject: Re: argv[] to /sbin/loader
Date: Fri, 3 Oct 1997 12:10:17 -0400 (EDT) [thread overview]
Message-ID: <199710031610.MAA13808@pongo.cv.nrao.edu> (raw)
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 <rmillner@NRAO.EDU> 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
next reply other threads:[~1997-10-03 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-03 16:10 Robert L. Millner [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-10-03 3:14 argv[] to /sbin/loader Robert L. Millner
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox