logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

unsetenv.3p (2684B)


  1. '\" et
  2. .TH UNSETENV "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. unsetenv
  12. \(em remove an environment variable
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdlib.h>
  17. .P
  18. int unsetenv(const char *\fIname\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIunsetenv\fR()
  23. function shall remove an environment variable from the environment
  24. of the calling process. The
  25. .IR name
  26. argument points to a string, which is the name of the variable to be
  27. removed. The named argument shall not contain an
  28. .BR '='
  29. character. If the named variable does not exist in the current
  30. environment, the environment shall be unchanged and the function is
  31. considered to have completed successfully.
  32. .P
  33. The
  34. \fIunsetenv\fR()
  35. function shall update the list of pointers to which
  36. .IR environ
  37. points.
  38. .P
  39. The
  40. \fIunsetenv\fR()
  41. function need not be thread-safe.
  42. .SH "RETURN VALUE"
  43. Upon successful completion, zero shall be returned. Otherwise, \-1
  44. shall be returned,
  45. .IR errno
  46. set to indicate the error, and the environment shall be unchanged.
  47. .SH ERRORS
  48. The
  49. \fIunsetenv\fR()
  50. function shall fail if:
  51. .TP
  52. .BR EINVAL
  53. The
  54. .IR name
  55. argument points to an empty string, or points to a
  56. string containing an
  57. .BR '='
  58. character.
  59. .LP
  60. .IR "The following sections are informative."
  61. .SH EXAMPLES
  62. None.
  63. .SH "APPLICATION USAGE"
  64. None.
  65. .SH RATIONALE
  66. Refer to the RATIONALE section in
  67. .IR "\fIsetenv\fR\^(\|)".
  68. .SH "FUTURE DIRECTIONS"
  69. None.
  70. .SH "SEE ALSO"
  71. .IR "\fIgetenv\fR\^(\|)",
  72. .IR "\fIsetenv\fR\^(\|)"
  73. .P
  74. The Base Definitions volume of POSIX.1\(hy2017,
  75. .IR "\fB<stdlib.h>\fP",
  76. .IR "\fB<sys_types.h>\fP"
  77. .\"
  78. .SH COPYRIGHT
  79. Portions of this text are reprinted and reproduced in electronic form
  80. from IEEE Std 1003.1-2017, Standard for Information Technology
  81. -- Portable Operating System Interface (POSIX), The Open Group Base
  82. Specifications Issue 7, 2018 Edition,
  83. Copyright (C) 2018 by the Institute of
  84. Electrical and Electronics Engineers, Inc and The Open Group.
  85. In the event of any discrepancy between this version and the original IEEE and
  86. The Open Group Standard, the original IEEE and The Open Group Standard
  87. is the referee document. The original Standard can be obtained online at
  88. http://www.opengroup.org/unix/online.html .
  89. .PP
  90. Any typographical or formatting errors that appear
  91. in this page are most likely
  92. to have been introduced during the conversion of the source files to
  93. man page format. To report such errors, see
  94. https://www.kernel.org/doc/man-pages/reporting_bugs.html .