NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/58687: sh: implement suspend builtin



The following reply was made to PR bin/58687; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/58687: sh: implement suspend builtin
Date: Mon, 23 Sep 2024 02:57:58 +0700

 That is the kind of thing which user specific functions are
 good for.
 
 In my startup files I have (amongst lots more)
 
 
 	stop()
 	{
 		kill -s STOP "$@"
 	}
 
 	z()
 	{
 		stop "$$"
 	}
 
 For me, "suspend" is much too much to type, I prefer just "z"...
 
 "stop" can also be used to stop some other process running in
 another terminal (where ^Z won't work, etc).   You could use
 TSTP if you prefer (that kind of difference is one reason why
 this is better as a user specific option) - I prefer SIGSTOP
 as that way the target process has no option, with TSTP it
 can simply say "no thanks" and continue.   But TSTP allows
 the process to tidy up before stopping, which STOP doesn't.
 It all depends what you prefer...
 
 I don't think there is any good reason to build any of this
 policy (name of the command, what signal is sent, ...) into
 the shell when users can easily define their own.
 
 kre
 


Home | Main Index | Thread Index | Old Index