List Info

Thread: shell question...




shell question...
user name
2006-01-31 16:46:37
D'Arcy J.M. Cain --> netbsd-help (2006-01-31 11:36:56
-0500):
> On Tue, 31 Jan 2006 16:42:04 +0100
> Jukka Salmi <j+nbsd2006.salmi.ch> wrote:
> > Hello,
> > 
> > after starting a process in the background
> > 
> > 	$ sleep 30 >/dev/null 2>&1 &
> > 
> > and killing it
> > 
> > 	$ kill $! >/dev/null 2>&1
> > 
> > the following is printed to the terminal:
> > 
> > 	[1]   Terminated              sleep 30
>/dev/null 2>&1
> 
> man nohup

Hmm, I don't think this helps...

$ nohup sleep 30 >/dev/null 2>&1 &
[1] 17842
$ kill $! >/dev/null 2>&1
[1] + Terminated           nohup sleep 30 > /dev/null
2>&1


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
shell question...
user name
2006-01-31 17:13:36
On Jan 31, 2006, at 11:46 AM, Jukka Salmi wrote:
>>> 	[1]   Terminated              sleep 30
>/dev/null 2>&1
>>
>> man nohup
>
> Hmm, I don't think this helps...
>
> $ nohup sleep 30 >/dev/null 2>&1 &
> [1] 17842
> $ kill $! >/dev/null 2>&1
> [1] + Terminated           nohup sleep 30 >
/dev/null 2>&1

Follow the nohup by a "disown %1", which will
remove the task from  
interacting with your shell.  Of course, either your shell
needs to  
support the disown functionality, or the task you run needs
to have  
the capability.  Otherwise consider:

     /usr/sbin/daemon echo "yeah" 2>&1 >
/dev/null

You could also hunt down DJB's daemontools, which have
similar  
intentions...

-- 
-Chuck

shell question...
user name
2006-01-31 17:37:41
Charles Swiger wrote:
> On Jan 31, 2006, at 11:46 AM, Jukka Salmi wrote:
> 
>>>>     [1]   Terminated              sleep 30
>/dev/null 2>&1
>>>
>>>
>>> man nohup
>>
>>
>> Hmm, I don't think this helps...
>>
>> $ nohup sleep 30 >/dev/null 2>&1 &
>> [1] 17842
>> $ kill $! >/dev/null 2>&1
>> [1] + Terminated           nohup sleep 30 >
/dev/null 2>&1
> 
> 
> Follow the nohup by a "disown %1", which will
remove the task from  
> interacting with your shell.  Of course, either your
shell needs to  
> support the disown functionality, or the task you run
needs to have  the 
> capability.  Otherwise consider:
> 
>     /usr/sbin/daemon echo "yeah" 2>&1
> /dev/null
> 
> You could also hunt down DJB's daemontools, which have
similar  
> intentions...
> 

Hi,

I'm just curious how it's possible that you have the
/usr/sbin/daemon on 
your NetBSD. I can't find it on NetBSD 2.0.2, 2.1, 3.0 and
current but 
yes, there is one on the FreeBSD 5.4 here ... 

Regards,

r.
shell question...
user name
2006-01-31 17:58:11
On Jan 31, 2006, at 12:37 PM, rudolf wrote:
>>     /usr/sbin/daemon echo "yeah"
2>&1 > /dev/null
>> You could also hunt down DJB's daemontools, which
have similar  
>> intentions...
>
> I'm just curious how it's possible that you have the
/usr/sbin/ 
> daemon on your NetBSD. I can't find it on NetBSD 2.0.2,
2.1, 3.0  
> and current but yes, there is one on the FreeBSD 5.4
here ... 

  I
didn't claim NetBSD has daemon, but a motivated person could
 
build one for NetBSD from here:

   http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/dae
mon/

...and it would likely solve the OP's problem.

-- 
-Chuck

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )