LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

Rep: Reputation: 0
Programming in C using ncurses


Hi,

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..

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

Rep: Reputation: 86
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().
 
  


Reply


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


All times are GMT -5. The time now is 09:07 PM.

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