Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-02-2010, 11:28 AM   #1
LQ Newbie
Registered: Sep 2009
Posts: 9

Rep: Reputation: 0
Programming in C using ncurses


I have a question, I was using ncurses in my program and made a user interface, that uses the menus. It is fine, but I wanted to execute another program when one item is selected. And after its exiting, I come back to the main one. I think that it can be done via window, but I wanted to separate them. Can you suggest me what to do? As I do it in Ubuntu Linux using fork & execl, that seems everything is mixed with the shell & if I don't do the closing of the objects, the keyboard & terminal attributes are the same as the one for the main, I used the system function, but not very different. I used atexit and when I use (probably) system (stdlib) function it calls the function registered with atexit. Please tell me the solution..

Old 05-03-2010, 10:52 AM   #2
Registered: Sep 2003
Posts: 382

Rep: Reputation: 87
You have seemingly indicated that you know of at least one way that is a solution, what you describe as "closing of the objects". It appears you don't wish to do that. So that leaves me wondering, what types of solutions are acceptable to you?

I can mention that if you examine the man page on FCNTL you can see how to use the FD_CLOEXEC flag and related concepts to cause some file descriptors to automagically close upon exec().


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ncurses programming -- problems in Framebuffer mode? vharishankar Programming 6 12-13-2006 01:10 AM
Programming with NCurses indienick Programming 7 07-11-2006 02:56 PM
C programming HELP, ncurses window functions naomi Programming 3 02-06-2005 05:54 AM
Parallel programming with ncurses problem StressedLemming Programming 4 02-26-2004 11:54 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration