screen-users
[Top][All Lists]
Advanced

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

Starting screen detached with noncanonical mode input processing


From: Leland Wang
Subject: Starting screen detached with noncanonical mode input processing
Date: Thu, 1 Jul 2004 17:58:02 +0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Recently I encountered a problem about starting screen detached with
noncanonical mode input processing. For example, if I have the following
icanon.c:

#include <stdio.h>
#include <termios.h>

int main(void)
{
    struct termios t;

    tcgetattr(0, &t);
    t.c_lflag &= ~ICANON;
    tcsetattr(0, TCSANOW, &t);
    while (getchar() != EOF)
        ;
    return 0;
}

and...

$ gcc icanon.c
$ screen ./a.out

then there is no problem. However, if I

$ screen -d -m ./a.out
$

a.out and screen terminate immediately because a.out gets EOF when
getchar(). I need to start screen detached and use noncanonical mode
because tip(1) uses noncanonical mode. I need to monitor a number of
serial consoles as soon as my server boots. Do anyone have any idea
how to remedy this problem?

Regards,
Leland Wang

- --
 /-------\      /-\     /--------\
 \--\ /--/      | |     \--\ /---/
    | |    /----/ \----\/--/ \---\
  /-/ \-\  \----/ /----/\--\ /---/
  \-\ /-/      /  \     /--/ \---\
    | |       / /\ \    \--\ /---/ /\
/---/ \---\/-/ /  \ \---\  | \----/ |
\---------/\--/    \----/  \--------/
  e-mail address: address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFA4n/JCQM7t5B2mhARAqPDAKCDDI6UPMvLGPuXqjxJt1IdL3DObgCeKJhs
Uk93I+MQEhcyRJo1Fvu8jIw=
=Y9wm
-----END PGP SIGNATURE-----




reply via email to

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