Solved

Detach from controlling tty in daemon process

Posted on 1998-10-30
2
802 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
Comment Utility
 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
Comment Utility
That certainly did the trick !!!  Thanks !  And so quick - within minutes!  This service is great!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

15 Experts available now in Live!

Get 1:1 Help Now