?
Solved

Detach from controlling tty in daemon process

Posted on 1998-10-30
2
Medium Priority
?
870 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

741 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