public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [ANNOUNCEMENT] New package: setsid-0.0-3
@ 2003-09-18 21:32 Corinna Vinschen
  2003-10-04  4:19 ` Terrence Brannon
  2004-03-03 23:31 ` Gregory Borota
  0 siblings, 2 replies; 5+ messages in thread
From: Corinna Vinschen @ 2003-09-18 21:32 UTC (permalink / raw)
  To: cygwin

This new package contains a tiny but handy tool called `setsid'.
It's the command line version of the system call setsid(2) and
is also available on a bunch of Linux distros.

Basically it allows to call an application, say `sleep', like this:

  setsid sleep 10

`setsid' forks and detaches from the controlling terminal and so
the inferior application will not be attached to the terminal as
well.  Or, to make it short, you can start an application as above
and immediately close the Windows console window while that application
keeps running.

On Cygwin, stdin, stdout and stderr are automatically redirected to
/dev/null if they are connected to the tty (Otherwise closing the
Windows console window wouldn't succeed).  If you want to keep the
output, redirect on the command line, e.g.

  setsid ls -l > ls.out


To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Once you've downloaded setup.exe, run it and select "Utils"
and then click on the appropriate field until the announced version
number appears if it is not displayed already.

If you have questions or comments, please send them to the Cygwin
mailing list at: cygwin@cygwin.com .  I would appreciate it if you would
use this mailing list rather than emailing me directly.  This includes
ideas and comments about the setup utility or Cygwin in general.

If you want to make a point or ask a question, the Cygwin mailing list
is the appropriate place.

              *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain.com@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sources.redhat.com/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

I implore you to READ this information before sending email about how
you "tried everything" to unsubscribe.  In 100% of the cases where
people were unable to unsubscribe, the problem was that they hadn't
actually read and comprehended the unsubscribe instructions.

If you need to unsubscribe from cygwin-announce or any other mailing
list, reading the instructions at the above URL is guaranteed to
provide you with the info that you need.

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCEMENT] New package: setsid-0.0-3
  2003-09-18 21:32 [ANNOUNCEMENT] New package: setsid-0.0-3 Corinna Vinschen
@ 2003-10-04  4:19 ` Terrence Brannon
  2004-03-03 23:31 ` Gregory Borota
  1 sibling, 0 replies; 5+ messages in thread
From: Terrence Brannon @ 2003-10-04  4:19 UTC (permalink / raw)
  To: cygwin



>Basically it allows to call an application, say `sleep', like this:
>
>  setsid sleep 10
>
>`setsid' forks and detaches from the controlling terminal and so
>the inferior application will not be attached to the terminal as
>well.  Or, to make it short, you can start an application as above
>and immediately close the Windows console window while that application
>keeps running.
>
>  
>
that sounds like nohup a bit...

no need to reply... just thinking out loud




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCEMENT] New package: setsid-0.0-3
  2003-09-18 21:32 [ANNOUNCEMENT] New package: setsid-0.0-3 Corinna Vinschen
  2003-10-04  4:19 ` Terrence Brannon
@ 2004-03-03 23:31 ` Gregory Borota
  2004-03-04 15:32   ` Corinna Vinschen
  1 sibling, 1 reply; 5+ messages in thread
From: Gregory Borota @ 2004-03-03 23:31 UTC (permalink / raw)
  To: cygwin


Under my 'CYGWIN_NT-5.1 1.5.7(0.109/3/2) i686' doing for example:

setsid ls -R /

would still block the console window (mostly for as long as ls runs).

IMO by redirecting only stdin to /dev/null one gets a setsid functionality
closer to
how setsid works under Linux and there is no difference concerning the
ability
to close the console window. (It's true that by not redirecting stdin,
console window
can only be killed)

Wouldn't then be better to redirect only stdin? Are things different under
Win9x/Me?

(I don't see the point for having stderr and stdout redirected also. (for
symmetry maybe))

Apologies if what I am suggesting is stupid.

Greg

----- Original Message ----- 
From: "Corinna Vinschen"


> This new package contains a tiny but handy tool called `setsid'.
> It's the command line version of the system call setsid(2) and
> is also available on a bunch of Linux distros.
>
> Basically it allows to call an application, say `sleep', like this:
>
>   setsid sleep 10
>
> `setsid' forks and detaches from the controlling terminal and so
> the inferior application will not be attached to the terminal as
> well.  Or, to make it short, you can start an application as above
> and immediately close the Windows console window while that application
> keeps running.
>
> On Cygwin, stdin, stdout and stderr are automatically redirected to
> /dev/null if they are connected to the tty (Otherwise closing the
> Windows console window wouldn't succeed).  If you want to keep the
> output, redirect on the command line, e.g.
>
>   setsid ls -l > ls.out
>
>
> To update your installation, click on the "Install Cygwin now" link on
> the http://cygwin.com/ web page.  This downloads setup.exe to your
> system.  Once you've downloaded setup.exe, run it and select "Utils"
> and then click on the appropriate field until the announced version
> number appears if it is not displayed already.
>
> If you have questions or comments, please send them to the Cygwin
> mailing list at: cygwin@cygwin.com .  I would appreciate it if you would
> use this mailing list rather than emailing me directly.  This includes
> ideas and comments about the setup utility or Cygwin in general.
>
> If you want to make a point or ask a question, the Cygwin mailing list
> is the appropriate place.
>
>               *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***
>
> If you want to unsubscribe from the cygwin-announce mailing list, look
> at the "List-Unsubscribe: " tag in the email header of this message.
> Send email to the address specified there.  It will be in the format:
>
> cygwin-announce-unsubscribe-you=yourdomain.com@cygwin.com
>
> If you need more information on unsubscribing, start reading here:
>
> http://sources.redhat.com/lists.html#unsubscribe-simple
>
> Please read *all* of the information on unsubscribing that is available
> starting at this URL.
>
> I implore you to READ this information before sending email about how
> you "tried everything" to unsubscribe.  In 100% of the cases where
> people were unable to unsubscribe, the problem was that they hadn't
> actually read and comprehended the unsubscribe instructions.
>
> If you need to unsubscribe from cygwin-announce or any other mailing
> list, reading the instructions at the above URL is guaranteed to
> provide you with the info that you need.
>
> -- 
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin@cygwin.com
> Red Hat, Inc.
>
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCEMENT] New package: setsid-0.0-3
  2004-03-03 23:31 ` Gregory Borota
@ 2004-03-04 15:32   ` Corinna Vinschen
  2004-03-05 10:19     ` Gregory Borota
  0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2004-03-04 15:32 UTC (permalink / raw)
  To: cygwin

On Mar  3 16:44, Gregory Borota wrote:
> (I don't see the point for having stderr and stdout redirected also. (for
> symmetry maybe))

In theory, redirecting all descriptors attached to the console window
should allow to close the console window since when the last open
handle is closed, Cygwin calls FreeConsole().  It's just that I don't
know currently why it doesn't close the console.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCEMENT] New package: setsid-0.0-3
  2004-03-04 15:32   ` Corinna Vinschen
@ 2004-03-05 10:19     ` Gregory Borota
  0 siblings, 0 replies; 5+ messages in thread
From: Gregory Borota @ 2004-03-05 10:19 UTC (permalink / raw)
  To: cygwin

Corinna wrote on 3/4/2004 8:07 AM:

> On Mar  3 16:44, Gregory Borota wrote:
> 
>>(I don't see the point for having stderr and stdout redirected also. (for
>>symmetry maybe))
> 
> 
> In theory, redirecting all descriptors attached to the console window
> should allow to close the console window since when the last open
> handle is closed, Cygwin calls FreeConsole().  It's just that I don't
> know currently why it doesn't close the console.
> 
> Corinna

If setsid is run inside a Windows console it works as described in the 
readme file. But when run from a cygwin console it won't let you close 
the console window only after the command has finished. This behavior is 
under my XP Prof.

Greg

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-05  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-18 21:32 [ANNOUNCEMENT] New package: setsid-0.0-3 Corinna Vinschen
2003-10-04  4:19 ` Terrence Brannon
2004-03-03 23:31 ` Gregory Borota
2004-03-04 15:32   ` Corinna Vinschen
2004-03-05 10:19     ` Gregory Borota

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).