[Vienna-pm] symlink: Ungültiger Dateidescriptor

Peter J. Holzer hjp-vienna-pm-list at hjp.at
Sat Jun 14 11:18:23 PDT 2008


On 2008-06-14 10:07:11 +0200, Calli wrote:
> Am Samstag, 14. Juni 2008 schrieb Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯:
> > du redest ganz schön wirr. Keine Angabe über Betriebssystem und
> > Perlversion, kein Quellcode zum nachvollziehen. 
> Dachte nicht, dass das so eine große Rolle spielt bei einer 
> Perl-Standard-Funktion.

Es ist vor allem eine Unix-Standardfunktion. Keine Ahnung, ob die unter
Windows überhaupt zur Verfügung steht.

>  SuSE 9.3, Kern 2.6.11.4-21.17-smp
> Perl 5.8.6-5.3
> > Wie soll man sich ein 
> > klares Bild über das Problem verschaffen?
> Das ist der etwas geänderte Funktionsaufruf (ich hatte Funktionen):
> 
>   $tstSL='/ir/gend/wo/tst'; # das dir gibt's und ist 'ganz offen' (777)
>   # ändere Pfad für $_[1] nicht Namen, für mit/ohne Pfad
>  foreach my $oF ( liesFiles('ir/gend/wo/files') ) {
>    # für Files mit und ohne Pfad
>     symlink($oF,$tstSL.(($oF =~ /.+\/(.+)/ ) ?  "/$1" : "/$_[1]") );
>     next if ( $? || $! =~ /exist/ ); # kein Fehler, wenn File exists.
[...]
> > Was mich stutzig macht: "Ungültiger Dateideskriptor" == EBADF, aber
> > das ist in man 2 symlink gar nicht aufgeführt. Überprüfst du
> > Rückgabewerte auf die korrekte Art?
> Siehe oben mit $? und $!

perldoc perlvar:

       $?      The status returned by the last pipe close, backtick ("``")
               command, successful call to wait() or waitpid(), or from the
               system() operator.


perldoc -f symlink:

       symlink OLDFILE,NEWFILE
               Creates a new filename symbolically linked to the old filename.
               Returns 1 for success, 0 otherwise.

	hp

-- 
   _  | Peter J. Holzer    | It took a genius to create [TeX],
|_|_) | Sysadmin WSR       | and it takes a genius to maintain it.
| |   | hjp at hjp.at         | That's not engineering, that's art.
__/   | http://www.hjp.at/ |	-- David Kastrup in comp.text.tex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.pm.org/pipermail/vienna-pm/attachments/20080614/ac19331e/attachment.bin 


More information about the Vienna-pm mailing list