Penguin
Diff: gethostname(2)
EditPageHistoryDiffInfoLikePages

Differences between current version and predecessor to the previous major change of gethostname(2).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 7 Last edited on Friday, March 18, 2005 9:50:03 pm by MichalMatyska
Older page: version 5 Last edited on Friday, February 21, 2003 5:47:52 pm by PerryLorier Revert
@@ -11,9 +11,9 @@
 !!RETURN VALUE 
 On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately. 
  
 !!ERRORS 
-;[EINVAL]: ''len'' is negative or, on Linux/i386, ''len'' is smaller than the actual size. (In this last case glibc 2.1 uses [NAMETOOLONG ].) 
+;[EINVAL]: ''len'' is negative or, on Linux/i386, ''len'' is smaller than the actual size. (In this last case glibc 2.1 uses [ENAMETOOLONG ].) 
 ;[EFAULT]: ''name'' is an invalid address. 
 ;[ENAMETOOLONG]: ''len'' is smaller than the length of the hostname 
  
 !!CONFORMING TO 
@@ -40,11 +40,10 @@
  perror("gethostname"); 
  return 1; 
 
  printf("%s\n",domain); 
- free(domain);  
  return 0; 
 
  
  
 !!SEE ALSO 
 getdomainname(2), setdomainname(2), uname(2) 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.