bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question about terminal mode after fork and before exec


From: Lucas Gonze
Subject: question about terminal mode after fork and before exec
Date: Tue, 19 Nov 2002 14:06:51 -0500 (EST)

a question for ncurses gurus:

My app has an ncurses window running.  The main process does a fork(),
redirects stderr, and then execvp().  If I write to stderr after the fork
and before the exec, the output text is wrappered in escape codes that I
assume are related to window handling.  This text is redirected to a log 
file, so the escape codes in the log file are a bug.

An example of the output text is:
        ^MESC[38BESC[1m> execvp: No such file or directory^MESC[m

I can get rid of the escape codes by calling endwin() in the child 
process, but obviously that ends the window in the parent process too.  
My guess is that the execvp resets the terminal in a clean way, and that I 
need to emulate that reset.  The question is either (1) how to do this or 
(2) is there a simpler way.

Thanks in advance.

- Lucas Gonze






reply via email to

[Prev in Thread] Current Thread [Next in Thread]