git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Improve portability: Cast pid_t's to intmax_t

From
GSGeorge Spelvin <linux@horizon.com>
Date
Sep 1, 2008, 08:28 UTC
Message-ID
<20080901082801.29621.qmail@science.horizon.com>

This seems rather pointless. Whatever Solaris thinks, I really doubt that process IDs will ever overflow an int, which is 32 bits on all machines that will ever support more than 32k processes.

You can be paranoid if you like and cast to long, but I don't think even a massive 64-bit cluster is likely to have more than 2G processes in the forseeable future.

I'd support a cast to int or unsigned, or a cast to long as a second choice.
Using uintmax_t is formally correct, but practically pointless clutter.
Next: Miles Bader
Message 1 of 2 in “Re: [PATCH v2] Improve portability: Cast pid_t's to intmax_t”
  1. George SpelvinSep 1, 2008
  2. Miles BaderSep 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.