Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #21233

Re: System calls from SP-Forth/Linux

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: System calls from SP-Forth/Linux
Date 2013-03-30 00:13 +0100
Organization 1&1 Internet AG
Message-ID <kj5769$ge5$1@online.de> (permalink)
References <1e8444f5-2e5b-497f-b4f9-7fc84fdfa38d@googlegroups.com> <2c69265c-bb98-470e-be5b-d7be766713d0@googlegroups.com>

Show all headers | View raw


ifsp.mauro@gmail.com wrote:
> It seams the system call S" cd /home/" does not work. What really happened
> is that SP-Forth created another shell, changed the prompt directory to
> /home/ and reverted to the old shell. bigFORTH shows the same behavior
> with cd:
> 
>                        ANS bigFORTH 386-Linux rev. 2.4.0
> 
> pwd /home/wlabia/frt/bigforth ok
> sh cd /home  ok
> pwd /home/wlabia/frt/bigforth ok
> 
> 
> I hope that a member of this group can give a solution to this problem. I
> would like to point out that bigFORTH has a cd command that works as
> expected. However SP-Forth does not have a default cd word.

But when you use bigForth's own cd, it suddenly works:

cd /home
pwd /home

Think about it: The current working directory is a property of each process.  
If you call bash, and let it cd somewhere, the bash process changes its 
current working directory.  Exiting that, and you are back in Forth, with 
the same PWD as before.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

System calls from SP-Forth/Linux Eduardo Costa <edu500ac@gmail.com> - 2013-03-28 13:52 -0700
  Re: System calls from SP-Forth/Linux Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-29 02:10 +0100
    Re: System calls from SP-Forth/Linux Eduardo Costa <edu500ac@gmail.com> - 2013-03-29 03:20 -0700
  Re: System calls from SP-Forth/Linux ifsp.mauro@gmail.com - 2013-03-29 15:00 -0700
    Re: System calls from SP-Forth/Linux Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-30 00:13 +0100
    Re: System calls from SP-Forth/Linux albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-30 12:28 +0000
  Re: System calls from SP-Forth/Linux Rosangela Medeiros da Silva <rosangelamesil@gmail.com> - 2013-03-29 19:14 -0700
    Re: System calls from SP-Forth/Linux albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-30 12:32 +0000
  Re: System calls from SP-Forth/Linux Rosangela Medeiros da Silva <rosangelamesil@gmail.com> - 2013-03-30 06:41 -0700
  Re: System calls from SP-Forth/Linux albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-30 15:59 +0000
    Re: System calls from SP-Forth/Linux Rosangela Medeiros da Silva <rosangelamesil@gmail.com> - 2013-03-30 18:36 -0700
      Re: System calls from SP-Forth/Linux albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-31 02:39 +0000
        Re: System calls from SP-Forth/Linux Rosangela Medeiros da Silva <rosangelamesil@gmail.com> - 2013-03-31 07:53 -0700
          Re: System calls from SP-Forth/Linux Bernd Paysan <bernd.paysan@gmx.de> - 2013-04-01 02:44 +0200

csiph-web