delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/08/18:49:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020908154759.02110e50@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Sun, 08 Sep 2002 15:49:59 -0700
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: problem with bash and interactive mode
In-Reply-To: <LPEHIHGCJOAIPFLADJAHOECCCMAA.chris@atomice.net>
Mime-Version: 1.0

Chris,

Why not use fork() / exec()? That's the POSIX / Unix / Linux / etc. way to 
programmatically initiate a sub-process.

Randall Schulz
Mountain View, CA USA


At 15:11 2002-09-08, you wrote:
>I am trying to write a 'su' utility for Cygwin. When I launch bash from my
>su command, it defaults to non-interactive mode (as if it's reading from a
>script). I have to explicitly add the -i option to force it into interactive
>mode. However if  I type 'bash' normally from the command line it runs
>interactively.
>According to the bash manpage, the criteria for determining whether to run
>interactively or not is down to the return value of isatty. I am starting
>the process using CreateProcess. I presume this is the same way that, for
>example, cmd.exe starts processes. However when I run bash from cmd.exe, it
>starts in interactive mode.
>Any help or pointers would be appreciated, thanks!
>
>Chris


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019