1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

This commit was generated by cvs2svn to compensate for changes in r64866,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
Mark Murray 2000-08-20 08:43:07 +00:00
commit 169c95233c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64867
4 changed files with 54 additions and 1 deletions

View File

@ -487,6 +487,7 @@ d_setpgrp2=''
d_bsdsetpgrp=''
d_setpgrp=''
d_setprior=''
d_setproctitle=''
d_setpwent=''
d_setregid=''
d_setresgid=''
@ -620,6 +621,7 @@ i_grp=''
i_iconv=''
i_ieeefp=''
i_inttypes=''
i_libutil=''
i_limits=''
i_locale=''
i_machcthr=''
@ -995,7 +997,7 @@ defvoidused=15
libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
libswanted="$libswanted dld ld sun m c cposix posix"
libswanted="$libswanted ndir dir crypt sec"
libswanted="$libswanted ucb bsd BSD PW x iconv"
libswanted="$libswanted ucb bsd BSD PW x iconv util"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@ -10934,6 +10936,10 @@ eval $inlibc
set setpriority d_setprior
eval $inlibc
: see if setproctitle exists
set setproctitle d_setproctitle
eval $inlibc
: see if setpwent exists
set setpwent d_setpwent
eval $inlibc
@ -14175,6 +14181,10 @@ eval $inhdr
set ieeefp.h i_ieeefp
eval $inhdr
: see if this is a libutil.h system
set libutil.h i_libutil
eval $inhdr
: see if locale.h is available
set locale.h i_locale
eval $inhdr
@ -15321,6 +15331,7 @@ d_setpgid='$d_setpgid'
d_setpgrp2='$d_setpgrp2'
d_setpgrp='$d_setpgrp'
d_setprior='$d_setprior'
d_setproctitle='$d_setproctitle'
d_setpwent='$d_setpwent'
d_setregid='$d_setregid'
d_setresgid='$d_setresgid'
@ -15467,6 +15478,7 @@ i_grp='$i_grp'
i_iconv='$i_iconv'
i_ieeefp='$i_ieeefp'
i_inttypes='$i_inttypes'
i_libutil='$i_libutil'
i_limits='$i_limits'
i_locale='$i_locale'
i_machcthr='$i_machcthr'

View File

@ -1837,6 +1837,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_setpent HAS_SETPROTOENT /**/
/* HAS_SETPROCTITLE:
* This symbol, if defined, indicates that the setproctitle routine is
* available to set process title.
*/
#$d_setproctitle HAS_SETPROCTITLE /**/
/* HAS_SETPWENT:
* This symbol, if defined, indicates that the setpwent routine is
* available for initializing sequential access of the passwd database.
@ -3099,5 +3105,11 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_flexfnam FLEXFILENAMES /**/
/* I_LIBUTIL:
* This symbol, if defined, indicates that <libutil.h> exists and
* should be included.
*/
#$i_libutil I_LIBUTIL /**/
#endif
!GROK!THIS!

View File

@ -1994,6 +1994,30 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
break;
#ifndef MACOS_TRADITIONAL
case '0':
#ifdef HAS_SETPROCTITLE
/* The BSDs don't show the argv[] in ps(1) output, they
* show a string from the process struct and provide
* the setproctitle() routine to manipulate that. */
{
s = SvPV(sv, len);
# if __FreeBSD_version >= 410001
/* The leading "-" removes the "perl: " prefix,
* but not the "(perl) suffix from the ps(1)
* output, because that's what ps(1) shows if the
* argv[] is modified. */
setproctitle("-%s", s, len + 1);
# else /* old FreeBSDs, NetBSD, OpenBSD, anyBSD */
/* This doesn't really work if you assume that
* $0 = 'foobar'; will wipe out 'perl' from the $0
* because in ps(1) output the result will be like
* sprintf("perl: %s (perl)", s)
* I guess this is a security feature:
* one (a user process) cannot get rid of the original name.
* --jhi */
setproctitle("%s", s);
# endif
}
#endif
if (!PL_origalen) {
s = PL_origargv[0];
s += strlen(s);

View File

@ -687,6 +687,11 @@ program sees. This is more useful as a way of indicating the current
program state than it is for hiding the program you're running.
(Mnemonic: same as B<sh> and B<ksh>.)
Note for BSD users: setting C<$0> does not completely remove "perl"
from the ps(1) output. For example, setting C<$0> to C<"foobar"> will
result in C<"perl: foobar (perl)">. This is an operating system
feature.
=item $[
The index of the first element in an array, and of the first character