草庐IT

segment_name

全部标签

linux - sd-bus API,sd_bus_request_name 返回权限被拒绝

systemd中的总线API221。当我在系统总线中请求一个对象的名称时,它会打印出一条错误消息“权限被拒绝”。我以root身份运行输出文件。"sd_bus_request_name(bus,"net.poettering.Calculator",0)"行抛出错误:"无法获取服务名称..:权限被拒绝"我认为root应该有权限获取一个对象的名称。有谁知道如何解决这个问题吗?提前致谢。这是来自http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html的示例代码:intmain(intargc,char*argv[]){sd_bus

php - Apache 日志 : child pid xxxx exit signal Segmentation fault (11)

Apache+PHP+Mysql+Linux[notice]childpid23145exitsignalSegmentationfault(11),/tmp中可能存在核心转储但是在/tmp下没有找到如何找到错误? 最佳答案 PHP代码中函数的无限循环导致此错误。 关于php-Apache日志:childpidxxxxexitsignalSegmentationfault(11),我们在StackOverflow上找到一个类似的问题: https://stac

linux - 如何将 file_name.csv.gz 文件解压缩为 .csv

关闭。这个问题是off-topic.它目前不接受答案。想改进这个问题吗?Updatethequestion所以它是on-topic用于堆栈溢出。关闭9年前。社区在去年审查了是否重新打开这个问题并让它关闭:原始关闭原因未解决Improvethisquestion我想将*.csv.gz格式的文件解压缩为.csv格式。当我尝试使用这些命令$gzip-dfile.gz和$gzip-ffile.gz时,它显示为gzip:IQ.gz:Nosuchfileordirectorygzip:Envoy.gz:Nosuchfileordirectorygzip:compresseddatanotreadf

c - linux中的信号量操作,收到SIGSEGV和segmentation fault,哪一部分出错了?

我的线程函数是:#include"stdio.h"#include"sys/types.h"#include"pthread.h"#include"semaphore.h"sem_tsem;intrunning=1;intret;void*pf(void*arg)//producerfunction{intsemval;while(running){sleep(1);sem_post(&sem);sem_getvalue(&sem,&semval);printf("produce:%d\n",semval);}}void*cf(void*arg)/*consumerfunction*/

c - 如果数组大小只能是一个常量值,那么 char d_name[...] 是什么意思?

如果数组大小只能是一个常量值,那么chard_name[...]是什么意思?实际上,在dirent.h文件中声明了一个structdirent。它的声明如下:structdirent{....ino_td_ino;chard_name[...];...};它用于一次读取一个目录内容,即inode号和文件名等...我的意思是这样一个数组的最大大小是多少,一旦定义了这样一个数组,在内存中静态分配了多少空间?这样的定义可移植吗? 最佳答案 假设它来自structlinux_dirent,它实际上是chard_name[]:structli

linux - 使用 crontab 在 @reboot 上运行 "screen -S name ./script"命令

我试过将它添加到我的crontab中:@reboot/root/启动“启动”文件:#!/bin/shsvnserve-d-r/root/svnrepos/mainressvnserve-d-r/root/svnrepos/mapres--listen-port=3691screen-Smta./mtaserver/mta-server>log1screen-Smapmta./mapserver/mta-server>log2exit0现在svnserve命令运行良好。问题出在screen命令上。log1和log2文件具有相同的内容,即:必须连接到终端。我想做的是在启动时启动这2个可执行

linux - Mercurial hg 克隆错误 - "abort: error: Name or service not known"

我已经为FedoraLinux安装了最新的hg包。但是hgclone报错。hgclonehttp://localmachine001:8000/repository报告:"abort:error:Nameorservicenotknown"localmachine001是本地网络中的一台计算机。我可以从我的Linux机器上ping它,没有任何问题。我也可以使用相同的http地址并浏览现有代码。但是,hgclone不起作用。如果我从我的Macintosh机器上执行相同的命令,我可以轻松地克隆存储库。一些互联网资源建议编辑.hgrc文件,并向其添加代理:[http_proxy]host=p

linux - 甲骨文查询 - ORA-01652 : unable to extend temp segment but only in some versions of sql*plus

这个让我很困惑。我编写了一个查询,它在我的开发客户端上运行良好,但在生产客户端上失败,出现错误“ORA-01652:无法通过...扩展临时段”。在这两种情况下,数据库和用户都是相同的。在我的开发机器(MSWindows)上,我有SQL*PLUS(9.0.1.4.0版)和Toad9.0(都使用oci.dll的9.0.4.0.1版)。两者都运行代码而没有错误。但是,当我在另一台机器上使用相同的用户名/密码针对相同的数据库运行相同的文件时,这次是版本10.2.0.4.0(来自10.2.0.4-1Oracle即时客户端),我得到了错误。它确实可重复发生。不幸的是,我只能有限地访问设置为只读的数

c - "Segmentation fault"当 `rmmod` 或 `modprobe -r`

尝试来自LDD3的最简单的内核模块无需对带有BusyBoxv1.23.0的BeagleBone板的自定义构建内核v4.1.0-rc6进行任何修改。该模块的代码如下:#include#includeMODULE_LICENSE("DualBSD/GPL");staticinthello_init(void){printk(KERN_ALERT"Hello,world\n");return0;}staticvoidhello_exit(void){printk(KERN_ALERT"Goodbye,cruelworld\n");}module_init(hello_init);module

c++ - 错误 : 'Friend Member Function Name' was not declared in this scope

我正在将我所有的C++Windows应用程序迁移到UbuntuLinux。此应用程序在Windows7操作系统的VisualStudio2015Community上运行良好。但是,在UbuntuLinux上的代码块中运行时会出错。我已经使用以下简单的Person类复制了我收到的错误消息。ErrorMessage:'comparePersonAge'wasnotdeclaredinthisscope人.h#ifndefPerson_h#definePerson_h#includeclassPerson{private:intage;std::stringname;public:Perso