Is there a command for Unix which can detach processfromconsole
and wait until its finish?
John Mills
johnmills at speakeasy.net
Sat Apr 5 05:25:09 PST 2003
Sergey, Freebies -
> sergey dyshel wrote:
> > I have one problem with '.xinitrc' file. I need to run
> > IceWM, detach it from console and wait until IceWM
> > exits. I know about 'detach' utility for Unix which
> > runs process, detaches it but doesn't wait. So when I
> > place "exec detach icewm" in the end of my '.xinitrc'
> > X server shuts down immediately after starting icewm
> > which isn't what I want. Is there a programm like
> > 'detach' which does't exit until detached process is finished?
Excuse me if I missed the point, but here is the tail end of a typical
'xinitrc' from my Linux box. You can see that it starts a number of
clients, then 'exec's the window manager. Is that what you had in mind?
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
if [ -f $HOME/.Xclients ]; then
exec $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
exec /etc/X11/xinit/Xclients
else
# failsafe settings. Although we should never get here
# (we provide fallbacks in Xclients as well) it can't hurt.
xclock -geometry 100x100-5+5 &
xterm -geometry 80x50-50+150 &
if [ -x /usr/bin/netscape -a -f /usr/share/doc/HTML/index.html ];
then
netscape /usr/share/doc/HTML/index.html &
fi
if [ -x /usr/X11R6/bin/fvwm2 ]; then
exec fvwm2
else
exec twm
fi
fi
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
John Mills
john.m.mills at alum.mit.edu
More information about the freebsd-questions
mailing list