# General Solution to spawning a Unix process whose arguments cannot be seen by other processes

**URL:** <https://www.ruby-forum.com/t/general-solution-to-spawning-a-unix-process-whose-arguments-cannot-be-seen-by-other-processes/152448>\
**Category:** Ruby\
**Created:** [November 4, 2008, 1:51am UTC](https://www.ruby-forum.com/t/general-solution-to-spawning-a-unix-process-whose-arguments-cannot-be-seen-by-other-processes/152448 "2008-11-04T01:51:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xeno\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/958977/32.png) [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Post date:** [November 4, 2008, 1:51am UTC](https://www.ruby-forum.com/t/general-solution-to-spawning-a-unix-process-whose-arguments-cannot-be-seen-by-other-processes/152448/1 "2008-11-04T01:51:24Z")

</div>

I know root can get into anything and hack out this information, but  
given the  
presumption that nobody could get root on my system:

1. How would I generally spawn processes to the shell whose arguments  
would not  
be easily visible to others on the server (I am already going https over  
the  
net, so that is at least minimally covered)…?
2. Is the subversion gem a good way to do this specifically for  
subversion?
3. Is there some other paradigm or perspective which would perhaps lead  
me to a  
better way all around of doing what I seem to want, which is to make a  
rhtml GUI  
that allows password access to certain secure commands?

Note among other things that I am doing load-each-time CGI with  
everything, no  
mod\_ruby, so there’s nothing going to lie around in memory forever, and  
at the  
same time $Save=0 is not an option. Also, this is an internal project,  
so it is  
NOT first-tier security from direct public access.

xc

---

<div class="post-metadata">

**Author:** ![Xeno\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/958977/32.png) [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Post date:** [November 4, 2008, 7:01am UTC](https://www.ruby-forum.com/t/general-solution-to-spawning-a-unix-process-whose-arguments-cannot-be-seen-by-other-processes/152448/2 "2008-11-04T07:01:16Z")

</div>

On Nov 3, 2008, at 5:49 PM, Xeno C. wrote:

> lead me to a better way all around of doing what I seem to want,
> 
> –  
> Those unfortunate enough to lean more to contrary than truth,  
> as they age, find themselves struggling gleefully in a deluded cloud,  
> only to waken too late mutilated in an iron maiden of their own  
> reality.

send the commands on stdin to the program.

IO.popen ‘cmd’, ‘r+’ do |pipe|  
pipe.write commands  
end

you can’t with all programs but if you are in control of them you sure  
can.

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

---

<div class="post-metadata">

**Author:** ![Xeno\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/958977/32.png) [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Post date:** [November 4, 2008, 7:45am UTC](https://www.ruby-forum.com/t/general-solution-to-spawning-a-unix-process-whose-arguments-cannot-be-seen-by-other-processes/152448/3 "2008-11-04T07:45:42Z")

</div>

2008/11/4 Xeno C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I know root can get into anything and hack out this information, but given  
> the presumption that nobody could get root on my system:
> 
> 1. 
> 
> ```
> How would I generally spawn processes to the shell whose arguments
> 
> ```
> 
> would not be easily visible to others on the server (I am already going  
> https over the net, so that is at least minimally covered)…?  
> On Linux, you can hide command line argument by setting $0 to  
> something else in the  
> spawned process.

Regards,  
Park H.
