www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/02/10:38:10

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
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020302073031.00ab0e38@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sat, 02 Mar 2002 07:38:09 -0800
To: Wade Brainerd <wadeb AT wadeb DOT com>, cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: changing the working directory from a c program
In-Reply-To: <14493710187.20020302022649@wadeb.com>
Mime-Version: 1.0

Wade,

No more so than in any other POSIX or Unix-like programming model. Child 
processes have next to no ability to directly affect their parents in this 
way. They can send signals, use other IPC processes (sockets, SysV IPC, 
etc.), but all these require cooperation. (Well, signals don't, but they 
don't convey much information, either).

If this were a BSD Unix or Linux, I'd suggest the TIOCSTI ioctl call, which 
simulates typed input. It would be a horrible hack and highly susceptible 
to interference and misinterpretation of the simulated typing, but under 
restricted circumstances, it might work. That ioctl call does not appear to 
be implemented in Cygwin.

Randall Schulz
Mountain View, CA USA


At 02:26 2002-03-02, Wade Brainerd wrote:
>Hi all,
>
>I'm aware that this is a troublesome issue and hard to do on all platforms 
>(Win32, various Unix's) but I'm asking anyway :)
>
>Under Cygwin, is there any way for a C program to change the current 
>working directory of the shell that executed it?  My best bet so far is to 
>wrap the C program in a script.
>
>Thanks,
>Wade Brainerd


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