当前位置: 技术问答>linux和unix
语句“LD_DEBUG=libs /u01/memcached/bin/memcached -h”的中间为啥不用分号?
来源: 互联网 发布时间:2017-02-23
本文导语: 在看memcache安装的一帖子,其中有如下一句 [root@centos2 ADunion]# LD_DEBUG=libs /u01/memcached/bin/memcached -h 我想,前面一句LD_DEBUG=libs应该是给变量赋值,后面一句应是调用memcache的命令。但根据常理,两句连写,中间应用 ...
在看memcache安装的一帖子,其中有如下一句
[root@centos2 ADunion]# LD_DEBUG=libs /u01/memcached/bin/memcached -h
我想,前面一句LD_DEBUG=libs应该是给变量赋值,后面一句应是调用memcache的命令。但根据常理,两句连写,中间应用 ;隔开,写成这样:
[root@centos2 ADunion]# LD_DEBUG=libs; /u01/memcached/bin/memcached -h
但作者为什么没加分号呢?这样写又包含什么含义呢?哪位明白人给解释下,先谢了。
[root@centos2 ADunion]# LD_DEBUG=libs /u01/memcached/bin/memcached -h
我想,前面一句LD_DEBUG=libs应该是给变量赋值,后面一句应是调用memcache的命令。但根据常理,两句连写,中间应用 ;隔开,写成这样:
[root@centos2 ADunion]# LD_DEBUG=libs; /u01/memcached/bin/memcached -h
但作者为什么没加分号呢?这样写又包含什么含义呢?哪位明白人给解释下,先谢了。
|
这样用是只为这个进程定义一个环境变量的意思,等于先fork,再putenv,再exec。
|
LD_DEBUG
(glibc since 2.1) Output verbose debugging information about the dynamic linker. If set to all prints all debugging information it has, if set to help prints a help message about which categories can be specified in this environment variable. Since glibc 2.3.4, LD_DEBUG is ignored for set-user-ID/set-group-ID binaries.
恩,确实是这样。
(glibc since 2.1) Output verbose debugging information about the dynamic linker. If set to all prints all debugging information it has, if set to help prints a help message about which categories can be specified in this environment variable. Since glibc 2.3.4, LD_DEBUG is ignored for set-user-ID/set-group-ID binaries.
恩,确实是这样。