?
Solved

cd and setenv in unix

Posted on 1999-10-26
5
Medium Priority
?
703 Views
Last Modified: 2006-11-17
How are setenv and cd coded in unix?
0
Comment
Question by:krn
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 2160115
Both are part of the shell and not unix itself as far as the commands themselves are concerned.   Download or buy one of the linux distribuitons and you'll have the source code to it.
0
 
LVL 1

Expert Comment

by:Ernest022699
ID: 2160735
Do you mean how to USE them (embedded in a program) or how to WRITE them (to change / add functionality)?
0
 

Author Comment

by:krn
ID: 2160828
I want to be able to see how they were written so I can modify it the code.  So, code is what I want.  
0
 

Accepted Solution

by:
codeten earned 150 total points
ID: 2161533
www.openbsd.org has access to the source code online. If this doesn't work, then you can access it using anonymous CVS. chdir looks like its implemented in lint, not c.

SETENV
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/setenv.c?rev=1.3

CHDIR
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/sys/
0
 

Author Comment

by:krn
ID: 2162440
Thanks
0

Featured Post

KuppingerCole Reviews AlgoSec in Executive Report

Leading analyst firm, KuppingerCole reviews AlgoSec's Security Policy Management Solution, and the security challenges faced by companies today in their Executive View report.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question