Skip to Content.

rare-dev - Re: [rare-dev] Integration of the release manager

Subject: Rare project developers

List archive


Re: [rare-dev] Integration of the release manager


Chronological Thread 
  • From: Alexander Gall <>
  • To: <>
  • Cc: <>
  • Subject: Re: [rare-dev] Integration of the release manager
  • Date: Wed, 6 Apr 2022 15:47:11 +0200

Hi

On Wed, 6 Apr 2022 14:37:06 +0200, mc36 <> said:

> hi,
> On 4/6/22 11:42, Alexander Gall wrote:

>>
>> Thanks, but one more thing to fix: ptyRun.bin does not return the exit
>> status of the process it's forking (it should also return a status >0
>> if the execvp() call fails). Can you please add that? I have to use
>> the pty wrapper because I'm adding a Y/N query to the tna-set-profile
>> and tna-switch-to-generation scripts to have the user confirm the
>> action.
>>

> with this change:
> https://github.com/mc36/freeRouter/commit/106dc976b7604c1a45fb62dd3c0691da74e93f38

Thanks. Why do we need the sleep(10)? It's pretty inconvenient.

There is another weird effect. When I use this method with my actual
script, I keep getting

% unknown exec command entered

I'm not sure yet what triggers this. It somehow seems related to using
"read" to get input from the user, not sure if that makes any sense. I
need to debug this further.

In any case, there is another show-stopper for having tna-set-profile
automatically switch to the new profile without a warm start. To do
the switch I would need to restart both processes (bfswd and bffwd),
but there is only one cmd2nd :(

> i see this:

> mc36@noti:/safe/binTmp$ ./ptyRun.bin /usr/bin/date ; echo $?
> child 1374969 created on 3
> child started
> Wed Apr 6 02:27:23 PM CEST 2022

> child closed stdio lines

> child exited with 0 code
> 0
> mc36@noti:/safe/binTmp$ ./ptyRun.bin /usr/bin/date -asdf ; echo $?
> child 1374981 created on 3
> child started
> /usr/bin/date: invalid option -- 'a'
> Try '/usr/bin/date --help' for more information.

> child closed stdio lines

> child exited with 256 code
> 1
> mc36@noti:/safe/binTmp$


>> BTW, why did you chose to write ptyRun as a separate tool rather than
>> creating another variant of the shell{1,2,3} things?
>>

> so the thing is that freerouter tries to be os independent...
> basically i mention nowhere "sh" nor "/bin" and so on...
> then, in java, they had not such a concept like pty...
> as far as i know it's exclusive to unixes, or maybe just linux?
> finally, i'm sure that there is a ptyprocessfactory out there but
> freerouter tries to be dependency free, especially for such a small
> things...

Makes sense, thanks for the explanation.

--
Alex



Archive powered by MHonArc 2.6.19.

Top of Page