getcwd() and friends.

G. Ewing greg at cantuar.UUCP
Mon Apr 17 12:00:26 AEST 1989


The Grey Wolf (greywolf at unisoft.UUCP) writes:
>Do you really mean "rather than" as "instead of"?  I like the idea of

Perhaps open() should be the only system call that takes a pathname,
all others taking a file descriptor, with library routines to provide
the rest.

>how would you change the mode of a file that was mode
>000?

Open it with O_NOTHING, of course.

># Just execute the directory by chdir-ing to it!

Once I created a directory called emacs to put my .el files in. Then I
wondered why the emacs command wouldn't work. The shell saw this thing
in the search path called emacs with the x bit on, and tried to execute
it...

I guess auto-chdir isn't such a silly idea. On the Mac, you run a program
by double clicking it, and you open a folder by double-clicking it. You
can also run a program by double clicking one of its documents. What
would that correspond to in a shell?

Greg Ewing				Internet: greg at cantuar.uucp
Spearnet: greg at nz.ac.cantuar		Telecom: +64 3 667 001 x8357
UUCP:	  ...!{watmath,munnari,mcvax,vuwcomp}!cantuar!greg
Post:	  Computer Science Dept, Univ. of Canterbury, Christchurch, New Zealand
Disclaimer: The presence of this disclaimer in no way implies any disclaimer.



More information about the Comp.unix.wizards mailing list