Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Detach from controlling tty in daemon process

Posted on 1998-10-30
2
Medium Priority
?
882 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
davidmwilliams earned 800 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

618 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