projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
062c5a1
)
(tempname): AND-off high bits of pid so that its decimal
author
Jim Meyering
<jim@meyering.net>
Wed, 26 Apr 1995 16:12:01 +0000
(16:12 +0000)
committer
Jim Meyering
<jim@meyering.net>
Wed, 26 Apr 1995 16:12:01 +0000
(16:12 +0000)
string representation is no longer than five digits.
From Hans Verkuil (hans@wyst.hobby.nl)
src/sort.c
patch
|
blob
|
history
diff --git
a/src/sort.c
b/src/sort.c
index
3c0b3a5
..
d45b664
100644
(file)
--- a/
src/sort.c
+++ b/
src/sort.c
@@
-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;