Bug: Hard link in perl 5.8.6 under Solaris 8?

D

daveo

I have an interesting problem. I have a file and directory which exist
on the same device but are pointed to by symlinks from another device.
First the directory:

$ ls -l /var/opt/zip/Zantaz/spool
lrwxrwxrwx 1 root other 20 Mar 21 15:58
/var/opt/zip/Zantaz/spool -> /spool0/Zantaz-spool

I'll do a df to show the device it's pointing to:

$ df /var/opt/zip/Zantaz/spool
/spool0 (/dev/vx/dsk/dbdg/vol01):67653708 blocks 8456713
files

Now for the file:

$ ls -l /var/opt/zip/Zmaster/spool/00/0000033070.0003883500
-rw------- 1 zip zip 412 Mar 18 20:27
/var/opt/zip/Zmaster/spool/00/0000033070.0003883500

$ df /var/opt/zip/Zmaster/spool/00/0000033070.0003883500
/spool0 (/dev/vx/dsk/dbdg/vol01):67653708 blocks 8456713
files

OK. The Solaris link command works fine:

$ ln /var/opt/zip/Zmaster/spool/00/0000033070.0003883500 \
/var/opt/zip/Zantaz/spool
$
$ ls -lL /var/opt/zip/Zantaz/spool
total 2
-rw------- 2 zip zip 412 Mar 18 20:27
0000033070.0003883500

OK. I've removed the file. Now I'll try it with the following perl
program:

$ cat /tmp/test
link("/var/opt/zip/Zmaster/spool/00/0000033070.0003883500",
"/var/opt/zip/Zantaz/spool"
) || die "$0: link failed: $!\n";

$ perl /tmp/test
/tmp/test: link failed: Cross-device link

Any ideas what's going on here? Is this a well known bug?

Thanks.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top