Summary: Eliminating PID#
Marc A. Ries
ries at trwrba.UUCP
Wed Feb 26 03:32:26 AEST 1986
[LE]
Thanks for all your responses concerning eliminating the return
of the Process ID number when a program is placed in background
via "&" and *sh*. Basically, all the solutions work. I did end
up changing the program code because the message I wanted was
going out via "stderr" (and thus would be lost if you redirected
it to /dev/null, etc.).
Here's a quick summary of the responses:
From: jwp at sdchem.UUCP
#! /bin/csh -f
(nice myprog &)
From: wtm at bunker.UUCP
Call this shell script "run_back". This script would
just contain: myprog& Then in your .profile, just run
"run_back" (NOTE: Do NOT run this in background).
From: edler at cmcl2.UUCP
sh -c 'command&'.
From: sean at ukma.UUCP
forkit myprog # <-- use a front-end "fork"ing program
From: sdcrdcf!allegra!mp
... [if] using stderr, not just stdout. Try
(checkmail 2>&1 &) 2>/dev/null
From:ihnp4!oliveb!jerry
... if the program is always run in the background then
it could place itself there. [i.e.:] if (fork()) exit(0);
More information about the Comp.unix.wizards
mailing list