[TUHS] whereis command

David Barto david at kdbarto.org
Mon Apr 25 02:31:35 AEST 2022



> On Apr 24, 2022, at 8:59 AM, ron minnich <rminnich at gmail.com> wrote:
> 
> Thanks.
> 
> I did find a newer-ish version and I always get a kick out of stuff like this:
> 
> free_dirlist(&ls, ALL_DIRS);
> 
> right before the call to exit ... an inappropriate response to an
> inappropriate warning, I suppose
> 
> I once had an intern ask me "but if you don't free memory before the
> program exits, then it can never get used again, right?" :-)
> 
> (and yes, I know, in the paleo era, that was in fact true)
> 
> I'll go try to find that archive ...
> 
> ron
> 

At $WORK we have a standing rule that all memory must be freed before the program exits.

This is to ensure that the rest of the program doesn’t have any memory leaks. ASAN, UBSAN,
Valgrind and the rest are good and far from perfect for detection of problems.

However making sure to free all memory before exit() does aid them in finding problems early.

	David

> On Sun, Apr 24, 2022 at 8:48 AM <arnold at skeeve.com> wrote:
>> 
>> ron minnich <rminnich at gmail.com> wrote:
>> 
>>> can someone point me at the earliest version of whereis? I first saw
>>> it in 4.1, but maybe it came sooner. Also, if you've got a link to man
>>> pages, thanks in advance.
>>> 
>>> I'm trying but failing to find it. My daughter says I suck at web
>>> search, which, given where I work, is a bid sad :-)
>> 
>> Looks like 2.79 BSD. From the TUHS archives:
>> 
>> $ tar -tzvf 2.79bsd.tar.gz | grep /whereis
>> -rwxr-xr-x 0/0            4412 1979-04-21 06:34 bin.v6/ucb/whereis
>> -rw-r--r-- 0/0            1692 1981-01-13 17:37 man/whereis.u
>> -rw-r--r-- 0/0            4519 1981-01-13 17:37 src/whereis.c
>> -rw-r--r-- 0/0            3851 1979-04-19 07:04 upgrade/src/whereis.c
>> 
>> Hope this helps.
>> 
>> Arnold



More information about the TUHS mailing list