Re: How to run a process without a controlling terminal?
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 01/26/05
- Next message: Spam2_at_Sharewareisland.com: "Tons of Free Software on FreewareTown.com"
- Previous message: Dave Uhring: "Re: How to run a process without a controlling terminal?"
- In reply to: Scott Simpson: "Re: How to run a process without a controlling terminal?"
- Next in thread: Dan Espen: "Re: How to run a process without a controlling terminal?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Jan 2005 04:03:37 GMT
On Wed, 26 Jan 2005 at 03:12 GMT, Scott Simpson wrote:
> Chris F.A. Johnson wrote:
>
>> On Wed, 26 Jan 2005 at 02:40 GMT, Scott Simpson wrote:
>>> I want to test if a script of mine works in an environment without a
>>> controlling terminal. Is there any way to run a command with the
>>> TIOCNOTTY ioctl turned on without writing a C program? I guess I can
>>> write a C program that does this and do a fork/exec but I'd rather not.
>>> Can I close /dev/tty in the shell somehow or run a command to do it?
>>
>> Would using at (or a cron job) work?
>
> That would probably do it. Guess I'll try. Pretty silly just to get rid of a
> controlling terminal.
You could use a function (or a separate script):
noterm()
{ ## USAGE: noterm COMMAND [OPTIONS] [ARGS]
printf "%s\n" "$@" | at now
}
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
===================================================================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Spam2_at_Sharewareisland.com: "Tons of Free Software on FreewareTown.com"
- Previous message: Dave Uhring: "Re: How to run a process without a controlling terminal?"
- In reply to: Scott Simpson: "Re: How to run a process without a controlling terminal?"
- Next in thread: Dan Espen: "Re: How to run a process without a controlling terminal?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|