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

Re: [PATCH] cast pid_t to long for printing

From
Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Date
Jun 26, 2006, 12:13 UTC
Message-ID
<20060626121325.GA19314@informatik.uni-freiburg.de>
In-Reply-To
<7vr71ci7yt.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 8 quoted lines
> Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:
> 
> > While fixing daemon.c, I saw that there is a call to syslog using %d for
> > pid_t, too.  I fixed that in the same way without further testing and
> > manual reading. I assume that's OK.
> 
> Is anybody using pid_t that is wider than int?  IOW, I wonder if
> it would make more sense to use "%d" with casting to int.
See types(3HEAD) e.g. on 
	http://docs.sun.com/app/docs/doc/816-5173/6mbb8ae36?a=view
So it's always as long as int, but it is defined as long...

Best regards Uwe

-- 
Uwe Zeisberger

http://www.google.com/search?q=gravity+on+earth%3D
Previous: Junio C Hamano
Message 6 of 6 in “Solaris 8”
  1. Uwe ZeisbergerJun 26, 2006
  2. include signal.h for prototype of signal()Uwe Zeisberger, Jun 26, 2006
  3. Uwe ZeisbergerJun 26, 2006
  4. cast pid_t to long for printingUwe Zeisberger, Jun 26, 2006
  5. Junio C HamanoJun 26, 2006
  6. Uwe ZeisbergerJun 26, 2006

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.