This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

daemonizing don't work (corrected)



Sorry, I jumped the gun a bit ...

Closer inspection of my code yielded:

if ( (fd=open("/dev/tty",O_RDWR,0))>=0 ) 
{
#ifndef _WIN32
  if ( ioctl(fd,TIOCNOTTY,NULL)==-1 ) 
  {
    printf("Can\'t detach /dev/tty - can\'t daemonize !");
    return(errno)
  }
#endif
  close(fd);
}

So I must change my statement to: 
Daemonizing has not exactly worked for me 
under cygwin b<anything>.

Is ioctl->TIOCNOTTY supported ?

Steve B.