Re: chdir on linux does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 24 May 2006 02:49 am, Noprianto wrote:
> Dear All,
>
> Anyone can tell me why this chdir code does not work on
> linux ?

If you  run this program in a terminal  it will do the chdir,
then restore the original directory when the program
exits.  Possibly this is what you are seeing?

>
> -> from what i read, chdir is system call number 12
>
>
> section .text
>         global _start
>
> _start:
>         mov eax, 12
>         mov ebx, dir
>         int 80h
>
>
>         mov eax, 1
>         mov ebx, 0
>         int 80h
>
>
>
> section .data
> dir:    db      '/bin'
>
>
>
> Thanks,
> Pri
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> -
> : send the line "unsubscribe linux-assembly"
> in the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Linux C Programming]     [Linux for Hams]     [DCCP]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux