Re: How to run a process without a controlling terminal?

From: Dan Espen (daneNO_at_SPAM.mk.telcordia.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 11:35:59 -0500

Scott Simpson <ssimpson@visionsolutions.com> writes:

> 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?

In a terminal:

(sleep 2 && runcommand &) ; exit



Relevant Pages

  • Re: Great SWT Program
    ... (and has a command to toggle display of markup, ... unlike Java's for and while syntax. ... Writing a script to strip the ... prose in a very artificially consistent sort of way, ...
    (comp.lang.java.programmer)
  • Re: minimum valid block size on DVD-RAM
    ... size accepted by DVD (writing) devices when writing ... a DVD-RAM is, like on nearly all other DVDs and CDs, ... I'd now like to know whether most of the available DVD-writers ... Please report me whether command 3 and command 2 succeed ...
    (freebsd-questions)
  • minimum valid block size on DVD-RAM
    ... size accepted by DVD (writing) devices when writing ... a DVD-RAM is, like on nearly all other DVDs and CDs, ... I'd now like to know whether most of the available DVD-writers ... Please report me whether command 3 and command 2 succeed ...
    (freebsd-questions)
  • Re: Great SWT Program
    ... (and has a command to toggle display of markup, ... have to consult the documentation for my shell of choice. ... and a particularly hairy syntax for distinguishing variables ... Writing a script to strip the ...
    (comp.lang.java.programmer)
  • Re: [patch] rm can have undesired side-effects
    ... different part of the disk. ... If writing zeros or whatever to a file (that may or may not overwrite ... separate features should be implemented in separate commands. ... is just not a good command to write a lot of data into a file. ...
    (freebsd-hackers)