Solved

Detach from controlling tty in daemon process

Posted on 1998-10-30
2
827 Views
Last Modified: 2013-12-26
How can I detach from the controlling tty in a daemon process, in C?
0
Comment
Question by:gumby119
2 Comments
 
LVL 4

Accepted Solution

by:
davidmwilliams earned 200 total points
ID: 1293884
 The answer is to use ioctl, like this -

        int fd;
        fd = open ("/dev/tty", O_RDWR);
        ioctl (fd, TIOCNOTTY, 0);
        close (fd);

  This will do exactly what you want.
0
 

Author Comment

by:gumby119
ID: 1293885
That certainly did the trick !!!  Thanks !  And so quick - within minutes!  This service is great!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MaxSpan challenge 9 94
sumHeights  challenge 17 70
Problem to open Excel file 15 128
Problem to App 4 78
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now