[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Kort, dumt spørgsmål



Det ville virke hvis argv[0] havde den fulde path. Det har den hvis
programmet startes fra en shell, men ikke når det startes fra en
webserver. Der indeholder argv[0] nemlig kun programmets navn. realpath
gør ikke andet end at udvide "." og ".." til rigtige navne, og det er
ikke nødvendigt ved en normal argv[0] fra en shell (det ved jeg dog kun
fra DOS-verdenen).

Søren


Mads Bondo Dydensborg wrote:
> 
> On Thu, 11 Oct 2001, Søren H. Sørensen wrote:
> 
> > Den duede ikke, for den kan kun ekspandere en path, men den opfriskede
> > min egen hukommelse, for "getcwd" gør lige det jeg ønskede. Tak
> > alligevel!
> 
> Jeg havde nok forestillet mig at du skulle bruge
> 
> char buf[_POSIX_PATH_MAX];
> realpath(argv[0], buf);
> 
> Men, det kan være at jeg misforstod det.
> 
> Mads
> 
> --
> Mads Bondo Dydensborg.                               sslug@sslug
> Imagine a federal law making it illegal for anyone (including Consumer
> Reports) to purposefully cause an automobile collision. While this may be a
> well-intentioned attempt to stop road-rage, it also bans automobile
> crash-testing, ultimately leading to unsafe vehicles and the inability to
> learn how to make vehicles safe in general. The situation with the DMCA is
> analogous.
>                                - Princton FAQ about the SDMI challenge


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *