Ask a Question related to Ruby, Design and Development.
-
Kurt M. Dresner #1
fork and modifying variables inside the new process
irb(main):001:0> a = true
=> true
irb(main):002:0> fork do
irb(main):003:1* a = false
irb(main):004:1> end
=> 2525
irb(main):005:0> a
=> true
Why is this so? What is the point of having my mutexes if I can't
manipulate the data anyway?
-Kurt
Kurt M. Dresner Guest
-
Flash OCX inside Visual Basic app- passing variables
Hi, can a variable only be passed by visual basic to the _root timeline of a flash movie playing in the ocx inside it? This will work in VB... -
Deleting or Modifying Session Variables in anothersession
Is it possible to delete or clear session variable from another session? Here's my scenario. A user opens the public part of a web site which... -
setting variables inside a php class
I am trying to change the value of a variable inside a class from one of its functions rather than the constructor, but it doesn't seem to work. ... -
Global variables and a forked process
Does a forked process share the memory locations of the global variables from the parent process? Thanks in advance! -
fork, childs, zombies, start a process in the background without waiting for it
Hi I have a parent program, that should loop (eternally), and start other programs without waiting for them, so many programs can be started at... -
mgarriss #2
Re: fork and modifying variables inside the new process
Kurt M. Dresner wrote:
Fork creates a whole new heavy process. I think you are looking for>irb(main):001:0> a = true
>=> true
>irb(main):002:0> fork do
>irb(main):003:1* a = false
>irb(main):004:1> end
>=> 2525
>irb(main):005:0> a
>=> true
>
>
>Why is this so? What is the point of having my mutexes if I can't
>manipulate the data anyway?
>
>-Kurt
>
>
>
>
Thread. Try something like:
Thread.new {
a = false
}
mgarriss Guest
-
Kurt M. Dresner #3
Re: fork and modifying variables inside the new process
The problem is that I want to call exec inside the new process, as well
as being able to send it things like SIGSTOP and SIGCONT.
Is there a way I can do this?
-Kurt
On Sun, Aug 17, 2003 at 07:57:51AM +0900, mgarriss wrote:> Kurt M. Dresner wrote:
>> Fork creates a whole new heavy process. I think you are looking for> >irb(main):001:0> a = true
> >=> true
> >irb(main):002:0> fork do
> >irb(main):003:1* a = false
> >irb(main):004:1> end
> >=> 2525
> >irb(main):005:0> a
> >=> true
> >
> >
> >Why is this so? What is the point of having my mutexes if I can't
> >manipulate the data anyway?
> >
> >-Kurt
> >
> >
> >
> >
> Thread. Try something like:
>
> Thread.new {
> a = false
> }
>
>
>======= End of Original Message =======<Kurt M. Dresner Guest
-
Kurt M. Dresner #4
Re: fork and modifying variables inside the new process
Actually it turns out I don't need that, I'm ok.
sorry,
Kurt
On Sun, Aug 17, 2003 at 08:09:20AM +0900, Kurt M. Dresner wrote:> The problem is that I want to call exec inside the new process, as well
> as being able to send it things like SIGSTOP and SIGCONT.
>
> Is there a way I can do this?
>
> -Kurt
>
> On Sun, Aug 17, 2003 at 07:57:51AM +0900, mgarriss wrote:>> > Kurt M. Dresner wrote:
> >> > Fork creates a whole new heavy process. I think you are looking for> > >irb(main):001:0> a = true
> > >=> true
> > >irb(main):002:0> fork do
> > >irb(main):003:1* a = false
> > >irb(main):004:1> end
> > >=> 2525
> > >irb(main):005:0> a
> > >=> true
> > >
> > >
> > >Why is this so? What is the point of having my mutexes if I can't
> > >manipulate the data anyway?
> > >
> > >-Kurt
> > >
> > >
> > >
> > >
> > Thread. Try something like:
> >
> > Thread.new {
> > a = false
> > }
> >
> >
> >======= End of Original Message =======<
>======= End of Original Message =======<Kurt M. Dresner Guest



Reply With Quote

