bsd

    0热度

    1回答

    我想在运行时获取一些进程信息,尤其是父进程名称。 虽然我能够获取当前进程名称,但似乎无法对其父进行相同操作。 下面是我在做什么: static inline bool is_debugserver_present() { int err; int mib[4]; struct kinfo_proc info; size_t size;

    0热度

    1回答

    我正在阅读tcp/ip说明的v2并与本书中的一系列代码混淆。 struct ifnet{ struct ifnet * if_next; …… } 这里是结构的背景信息,这可以帮助你了解更多的问题 void if_attach(struct ifnet* ifp){ struct ifnet **p = &ifnet; while(*p):

    0热度

    1回答

    使用从apple's open source repo最新消息透露我已经衍化为“STAT”结构的结构如下(以去语法): type timespec struct { tv_sec int32 tv_nsec uint32 } type stat64 struct { st_dev int32 /* [XSI] ID of device containi

    2热度

    1回答

    通常通过调用close()来关闭套接字。但是如果你想重置/中止连接(RST包)呢?你如何从userland发送它?

    0热度

    1回答

    我有一个目录〜形式 output/Manuscript_00750_AnimalGiants-compact.json output/Manuscript_00750_AnimalGiants-expanded.json output/Manuscript_00750_AnimalGiants.json output/Manuscript_00752_AnimalGiants-compact

    0热度

    1回答

    我通过编译另一个程序来制作exe文件(d.out)。而nlist函数总是返回-1。 fopen func返回!= null。如果它的事项我编译我的PROG这样 gcc -I/usr/include main.c -L/usr/lib/i386-linux-gnu/pkgconfig -lbsd #include <string.h> #include <bsd/nlist.h> #includ

    0热度

    3回答

    我正在处理需要解析ps命令返回的数据的脚本。在Redhat/Centos上,我知道它很容易指定列分隔符,但是与BSD version of PS一样,它并不那么简单。 我知道这将有可能使用awk,sed或tr以取代任何字符空间,但可以说的格式有args或comm中间的某个位置,输出将是: $ ps -o pid,ppid,args,user | head PID PPID ARGS

    2热度

    1回答

    getrusage返回包含 long ru_maxrss; /* max resident set size */ 什么是ru_maxrss单位,在BSD操作系统的一个结构?这个值是以字节为单位,还是以千字节为单位? “BSD”是指FreeBSD,OpenBSD,但不是Mac OS X/Darwin。 的FreeBSD man page和OpenBSD man page说,单位是千字节: r

    1热度

    1回答

    我想知道什么系统调用是由echo(该命令,而不是内置的shell)产生的,所以我决定通过dtrace监听它。具体而言,我使用了dtruss。 考虑到了以下工作(跟踪由sed所做的所有的系统调用): sudo dtruss /usr/local/bin/sed 's/a/e/' <<< 'cat' SYSCALL(args) = return thread_selfid(0x0, 0x0, 0

    0热度

    1回答

    我简单的Fab文件不能我的FreeBSD系统上运行: from fabric.api import run, env env.shell = '/usr/local/bin/bash' #Fabric doesn't know where to get bash on BSD correctly def host_type(): run('uname') 首先,我得到一个错误有