[Info-vax] Hard links on VMS ODS5 disks
Arne Vajhøj
arne at vajhoej.dk
Sun Jul 16 14:30:22 EDT 2023
On 7/16/2023 2:28 PM, Arne Vajhøj wrote:
> The two cost are hardware and peoples time.
>
> With todays TB disks it is very unlikely that having two copies of some
> executables will require buying bigger and more expensive disk(s).
>
> Having developer support the name test logic on multiple platforms
> and having sys admins needing to worry about linked stuff
> when they clean up is a very small effort but still an
> effort greater than zero.
And just to make sure we are talking about the same.
VMS example:
$ type a.c
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("I am A\n");
return 0;
}
$ cc a
$ link a
$ type b.c
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("I am B\n");
return 0;
}
$ cc b
$ link b
$ run a
I am A
$ run b
I am B
$ del a.exe;*, b.exe;*
$ type ab.c
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
if(strstr(argv[0], "]a.exe;") != NULL)
{
printf("I am A\n");
}
if(strstr(argv[0], "]b.exe;") != NULL)
{
printf("I am B\n");
}
return 0;
}
$ cc ab
$ link ab
$ set file/enter=a.exe ab.exe
$ set file/enter=b.exe ab.exe
$ run a
I am A
$ run b
I am B
$ set file/remove a.exe;1
$ set file/remove b.exe;1
Arne
More information about the Info-vax
mailing list