Hi, On Tue, May 23, 2006 at 07:49:29PM -0700, Noprianto wrote: > -> from what i read, chdir is system call number 12 Yep, but better use something like %define __NR_chdir 12 to make code more readable. Also, your example works just fine here: $ nasm a.asm -f elf $ gcc a.o -o a -nostdlib $ strace ./a execve("./a", ["./a"], [/* 30 vars */]) = 0 chdir("/bin") = 0 _exit(0) = ? Remember that chdir affects only the process that calls chdir. You can't e.g. write a replacement for shell's builtin "cd" command that way. best regards, Timo Lindfors
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- Re: chdir on linux does not work
- From: Frank Kotler
- Re: chdir on linux does not work
- References:
- chdir on linux does not work
- From: Noprianto
- chdir on linux does not work
- Prev by Date: chdir on linux does not work
- Next by Date: Re: chdir on linux does not work
- Previous by thread: chdir on linux does not work
- Next by thread: Re: chdir on linux does not work
- Index(es):