没有了vfork()的孩子拥有什么权限? [英] What Privileges does vfork() child possess ?

查看:62
本文介绍了没有了vfork()的孩子拥有什么权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用vfork()创建的进程是否具有与创建者进程(即父进程)相同级别的特权?

Does the process created with vfork() has same the same level of privileges that of a creator process i.e parent process ?

例如:如果我运行一个过程作为根确实的vfork()子具有相同的执行特权?

example : If I run a process as root does vfork() child possess the same execution privileges?

推荐答案

表示:

功能必须创建一个新的过程.新进程(子 过程)应调用进程的精确副本(父 过程)除以下详述的:

The fork() function shall create a new process. The new process (child process) shall be an exact copy of the calling process (parent process) except as detailed below:

由于该文本下方未提及UID/GID,因此您可以推断出这些属性是继承的.

As there is no mention of UIDs/GIDs below that text, you can deduce that these properties are inherited.

这些性质最终通过改变函数的调用来适当属性改变(等)或

These properties are eventually changed by calls to appropriate property changing functions (setuid, etc) or exec.

在旧(POSIX 2004或更早)的 是相似的:

The old (POSIX 2004 or earlier) specification of vfork() is similar:

函数应当相当于,不同之处在于,如果处理由所创建的行为是未定义任一修改比类型的变量之外的任何数据用于从存储返回值,或从其中叫,或成功地调用之前调用的任何其他功能的功能返回或功能的家族中的一个.

The vfork() function shall be equivalent to fork(), except that the behavior is undefined if the process created by vfork() either modifies any data other than a variable of type pid_t used to store the return value from vfork(), or returns from the function in which vfork() was called, or calls any other function before successfully calling _exit() or one of the exec family of functions.

的规格从2008 POSIX除去(又名POSIX 2016).

The specification of vfork() was removed from POSIX 2008 (aka POSIX 2016).

这篇关于没有了vfork()的孩子拥有什么权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆