home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!pipex!warwick!str-ccsun!str-va!cbas25
- From: cbas25@vaxa.strath.ac.uk
- Subject: Problem with "chdir"
- Message-ID: <1992Aug31.161656.1@vaxa.strath.ac.uk>
- Lines: 33
- Sender: news@ccsun.strath.ac.uk (News account )
- Nntp-Posting-Host: vaxe
- Organization: Strathclyde University VAX Cluster
- Date: Mon, 31 Aug 1992 16:16:56 GMT
-
- The following piece of code illustrates an anomaly between
- IRIX 4.0.x and earlier versions of IRIX.
- With 4.0.0 and 4.0.5 the second and third write
- statements always print zero, wheras the second should be -1
- and the third should be zero (unless you are in root directory!)
- I seem to remember that --chdir-- worked correctly in 3.3.1, but I have
- converted both my machines to 4.0.1 and 4.0.5 and so cannot
- verify this now.
- Compiled on Personal Iris 4D-20
- C-------------------------------cut here------------------------
- PROGRAM CHANGEDIR
-
- C To test the fortran subroutine chdir
- I = 999
- write (*,*) I
- I = chdir ('notthere') ! This directory is not there
- write (*,*) I ! Should return -1
- call system ('pwd') ! No change in directory
- I = chdir ('..') ! Go to parent directory
- write (*,*) I ! Should return 0
- call system ('pwd') ! Should now be parent directory
- stop
- end
- C-------------------------------cut here------------------------
-
- Peter Bladon
- Department of Pure and Applied Chemistry
- University of Strathclyde
- Glasgow G1 1XL
- Scotland
-
- e-mail cbas25%vaxa.strath.ac.uk
-
-