1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-07 09:11:11 +02:00

(tempname): AND-off high bits of pid so that its decimal

string representation is no longer than five digits.
From Hans Verkuil (hans@wyst.hobby.nl)
This commit is contained in:
Jim Meyering
1995-04-26 16:12:01 +00:00
parent 062c5a1fd0
commit a3edacb315
+1 -1
View File
@@ -315,7 +315,7 @@ tempname ()
(len && temp_file_prefix[len - 1] != '/'
? "%s/sort%5.5d%5.5d"
: "%ssort%5.5d%5.5d"),
temp_file_prefix, (int) getpid (), ++seq);
temp_file_prefix, (unsigned int) getpid () & 0xffff, ++seq);
node->name = name;
node->next = temphead.next;
temphead.next = node;