public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Randall R Schulz <rrschulz@cris.com>
To: Wade Brainerd <wadeb@wadeb.com>, cygwin@cygwin.com
Subject: Re: changing the working directory from a c program
Date: Sat, 02 Mar 2002 07:37:00 -0000	[thread overview]
Message-ID: <5.1.0.14.2.20020302073031.00ab0e38@pop3.cris.com> (raw)
In-Reply-To: <14493710187.20020302022649@wadeb.com>

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/

      reply	other threads:[~2002-03-02 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-02  2:26 Wade Brainerd
2002-03-02  7:37 ` Randall R Schulz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.2.20020302073031.00ab0e38@pop3.cris.com \
    --to=rrschulz@cris.com \
    --cc=cygwin@cygwin.com \
    --cc=wadeb@wadeb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).