<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: C symlink() and unlink() problem in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062690#M38388</link>
    <description>John,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  If you think it's a bug, please lodge a formal report with HP.&lt;BR /&gt;&lt;BR /&gt;This is what I generally do, but the before doing this I would like to be sure it's a bug, for example it's may be a expected behavior if some DECC$* feature is not enable and there are so many...&lt;BR /&gt;&lt;BR /&gt;I would like to know if someone has encountered (and solve) this problem.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;JF</description>
    <pubDate>Thu, 30 Aug 2007 01:07:47 GMT</pubDate>
    <dc:creator>Jean-François Piéronne</dc:creator>
    <dc:date>2007-08-30T01:07:47Z</dc:date>
    <item>
      <title>C symlink() and unlink() problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062688#M38386</link>
      <description>Using Mercurial, 8.3 VMS, ACRTL V300 on an Itanium I have found that C unlink() don't work on a symbolic link, I have write a small C reproduced:&lt;BR /&gt;&lt;BR /&gt;$ dir /dat s&lt;BR /&gt;%DIRECT-W-NOFILES, no files found&lt;BR /&gt;$ ty foo.c&lt;BR /&gt;#include  &lt;UNISTD.H&gt;&lt;BR /&gt;#include &lt;ERRNO.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;main() {&lt;BR /&gt;char buf[200];&lt;BR /&gt;int len ;&lt;BR /&gt;symlink("The link value", "./s");&lt;BR /&gt;perror("symlink");&lt;BR /&gt;errno = 0;&lt;BR /&gt;len = readlink("./s", buf, 100);&lt;BR /&gt;perror("readlink");&lt;BR /&gt;errno = 0;&lt;BR /&gt;buf[len] = 0;&lt;BR /&gt;puts(buf);&lt;BR /&gt;unlink("./s");&lt;BR /&gt;perror("unlink");&lt;BR /&gt;}&lt;BR /&gt;$ r foo&lt;BR /&gt;symlink: no such file or directory&lt;BR /&gt;readlink: error 0&lt;BR /&gt;The link value&lt;BR /&gt;unlink: no such file or directory&lt;BR /&gt;sg1&amp;gt; dir/dat s&lt;BR /&gt;&lt;BR /&gt;Directory SYS$SYSROOT:[SYSMGR.python_tmp]&lt;BR /&gt;&lt;BR /&gt;S.;1 -&amp;gt; The link value&lt;BR /&gt;                     29-AUG-2007 23:26:02.86&lt;BR /&gt;&lt;BR /&gt;Total of 1 file.&lt;BR /&gt;$&lt;BR /&gt;So The link is correctly created but the unlink() routine is unable to delete it.&lt;BR /&gt;&lt;BR /&gt;I don't have any 8.3 alpha system so I can't test on such platform.&lt;BR /&gt;&lt;BR /&gt;If I define DECC$POSIX_COMPLIANT_PATHNAMES to 1&lt;BR /&gt;then the symbolic link is correctly deleted.&lt;BR /&gt;But, this logical is not really useful due to current restriction.&lt;BR /&gt;&lt;BR /&gt;Any idea?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JF&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIO.H&gt;&lt;/ERRNO.H&gt;&lt;/UNISTD.H&gt;</description>
      <pubDate>Wed, 29 Aug 2007 16:36:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062688#M38386</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2007-08-29T16:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: C symlink() and unlink() problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062689#M38387</link>
      <description>JF,&lt;BR /&gt;&lt;BR /&gt;  If you think it's a bug, please lodge a formal report with HP.&lt;BR /&gt;&lt;BR /&gt;Send them your reproducer, plus transcripts of the run, clearly pointing out the behaviour observed, and the behaviour expected. Once they've reproduced your symptoms, they can try and figure out if it's a bug (never easy in this territory!)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Aug 2007 20:21:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062689#M38387</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2007-08-29T20:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: C symlink() and unlink() problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062690#M38388</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  If you think it's a bug, please lodge a formal report with HP.&lt;BR /&gt;&lt;BR /&gt;This is what I generally do, but the before doing this I would like to be sure it's a bug, for example it's may be a expected behavior if some DECC$* feature is not enable and there are so many...&lt;BR /&gt;&lt;BR /&gt;I would like to know if someone has encountered (and solve) this problem.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Thu, 30 Aug 2007 01:07:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062690#M38388</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2007-08-30T01:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: C symlink() and unlink() problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062691#M38389</link>
      <description>JF,&lt;BR /&gt;&lt;BR /&gt;I can confirm that Alpha 8.3 shows the same behavious with C V7.1.&lt;BR /&gt;&lt;BR /&gt;It appears to relate to the ambiguity resulting from the filename "./s".&lt;BR /&gt;&lt;BR /&gt;When the file doesn't exists (at the stage of symlink), then CRTL is treating it as a file specification - so we get the S.;1 name.&lt;BR /&gt;&lt;BR /&gt;However, when the file spec is handled for unlink, it is coming up with a non-existent filename.&lt;BR /&gt;&lt;BR /&gt;If you force the filename to a VMS style spec, like this&lt;BR /&gt;&lt;BR /&gt;unlink("sys$sysdevice:[duncan]S.;1");&lt;BR /&gt;&lt;BR /&gt;then the unlink works.&lt;BR /&gt;&lt;BR /&gt;So I would agree with you that it seems to be a problem with the interpretation of the "./S" specification between symlink and unlink.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;BR /&gt;</description>
      <pubDate>Fri, 31 Aug 2007 12:00:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062691#M38389</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2007-08-31T12:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: C symlink() and unlink() problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062692#M38390</link>
      <description>John Malmberg has recently added some code to Perl for this situation.  His comment says:&lt;BR /&gt;&lt;BR /&gt; * The CRTL for 8.3 and later can create symbolic links in any mode,&lt;BR /&gt; * however in 8.3 the unlink/remove/delete routines will only properly handle&lt;BR /&gt; * them if one of the PCP modes is active.&lt;BR /&gt;&lt;BR /&gt;So he rolled his own in terms of SYS$ERASE.  You can look for Perl_kill_file() and rms_erase() here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://public.activestate.com/cgi-bin/perlbrowse/f/vms/vms.c" target="_blank"&gt;http://public.activestate.com/cgi-bin/perlbrowse/f/vms/vms.c&lt;/A&gt;</description>
      <pubDate>Fri, 31 Aug 2007 16:34:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062692#M38390</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2007-08-31T16:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: C symlink() and unlink() problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062693#M38391</link>
      <description>Ducan, thanks for the test.&lt;BR /&gt;&lt;BR /&gt;Craig, this is exactly what I have done:&lt;BR /&gt;&lt;A href="http://hg.vmspython.dyndns.org/vmspython/rev/4c64e74e4c80" target="_blank"&gt;http://hg.vmspython.dyndns.org/vmspython/rev/4c64e74e4c80&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I try to use unlink and if it failed then I fall back to sys$erase.&lt;BR /&gt;&lt;BR /&gt;So it seem it is a bug in the CRTL.&lt;BR /&gt;&lt;BR /&gt;I just found that getnameinfo is buggy in TCPIP 5.6 and fix this in a forthcoming Python kit...&lt;BR /&gt;&lt;BR /&gt;Thanks to all,&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Sat, 01 Sep 2007 02:50:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-symlink-and-unlink-problem/m-p/4062693#M38391</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2007-09-01T02:50:38Z</dc:date>
    </item>
  </channel>
</rss>

