lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev peculiar behavior


From: T.E.Dickey
Subject: Re: lynx-dev peculiar behavior
Date: Sat, 10 Jul 1999 09:33:37 -0400 (EDT)

> Then please try replacing it with another interactive program that can 
> be suspended - less, some other editor, even lynx itself.  Try several. 
> My guess is you'll see similar behaviour. 
>  
> I have seen something like this in the past with lynx.  I think the 
> problem lies in the implementation of system(). 

It's not 100% ncurses (small relief).  I tried lynx with Solaris curses and vi,
and get some odd behavior (using a mail link):

        + when I do 'fg', it does come back to vi, but the video attributes
          are incorrect (so all of the text is in reverse-video).  That
          indicates (to me) that Lynx (or Solaris curses) is writing something.

        + quitting from vi, the control/G doesn't cancel the operation
          (control/C still kills it, but that's not quite what I'd like).

I can see similar behavior on Linux using nvi (linked with ncurses).

> Larry, what does the system() man page say?  Mine says (linux) 
>  
>        system() executes a command specified in string by calling 
>        /bin/sh -c string, and returns after the command has  been 
>        completed.   During execution of the command, SIGCHLD will 
>        be blocked, and SIGINT and SIGQUIT will be ignored. 
>  
> Does yours also mention signals, especially SIGCHLD? 

SunOS shell 5.6 Generic_105181-14 sun4u sparc SUNW,Ultra-2

Standard I/O Functions                                 system(3S)



NAME
     system - issue a shell command

SYNOPSIS
     #include <stdlib.h>

     int system(const char *string);

DESCRIPTION
     The system() function causes the string to be given  to  the
     shell as input, as if the string had been typed as a command
     at a terminal.  The invoker waits until the shell  has  com-
     pleted,  then  returns  the  exit status of the shell in the
     format specified by waitpid(2).

     If string is a null pointer, system() checks  if  the  shell
     exists  and  is executable.  If the shell is available, sys-
     tem() returns non-zero; otherwise it returns zero.   If  the
     application  is standard-conforming (see standards(5)), sys-
     tem() uses /usr/bin/ksh  (see  ksh(1));  otherwise  system()
     uses /usr/bin/sh (see sh(1)).

RETURN VALUES
     The system() function forks to create a child  process  that
     in  turn execs the shell in order to execute string.  If the
     fork() or exec() fails, system() returns a value of  -1  and
     sets errno.

ERRORS
     The system() function fails if one or more of the  following
     are true:

     EAGAIN      The system-imposed limit on the total number  of
                 processes under execution by a single user would
                 be exceeded.

     EINTR       system() was interrupted by a signal.

     ENOMEM      The new process requires  more  memory  than  is
                 available.

ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     __________________________________
    | ATTRIBUTE TYPE|  ATTRIBUTE VALUE|
    |_______________|_________________|
    | MT-Level      |  Unsafe         |
    |_______________|_________________|





SunOS 5.6           Last change: 26 Feb 1997                    1






Standard I/O Functions                                 system(3S)



SEE ALSO
     ksh(1), sh(1),  useradd(1M),  exec(2),  fork(2),  setuid(2),
     waitpid(2), attributes(5), standards(5)

NOTES
     The system() function will fail to execute setuid() or  set-
     gid()  if  either  the  uid  or  gid  of  the  application's
     owner/group  is  less  than  100.   (see   useradd(1M)   and
     setuid(2)).














































SunOS 5.6           Last change: 26 Feb 1997                    2





-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

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