Chuck Swiger --> netbsd-help (2006-01-31 10:53:15 -0500):
> Jukka Salmi wrote:
> [ ... ]
> > [1] 6980
> >
> > I guess it's the shell who prints these strings,
isn't it? If yes, is
> > there a way to suppress this output?
>
> Yes, it is the shell that produces that output.
>
> You can suppress the output by having the process
disassociate itself from the
> shell's process group and tty. Most daemons will do so
automaticly (see "man 3
> daemon", "man 8 daemon"), and some
shells have a "disown" primitive which will
> disown a backgrounded task.
I see. Hmm, the program I want to run in the background is
itself a
shell script, and the shell doesn't seem to have such a
disown
primitive.
Is it possible to do something like daemon(3) in shell? I
tried with
putting
cd /
exec <&-
exec >&-
exec 2>&-
to the top of my script, but this seems not to be enough...
Regards, Jukka
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
|