Message11889

Author psykiatris
Recipients jeff.allen, mga792, psykiatris
Date 2018-04-11.04:27:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <2fdece2a-bc97-3670-2ee4-84e39f0d7e97@gmail.com>
In-reply-to <b57d63e2-c56d-b123-721e-129a8d58300e@gmail.com>
Content
And for system programs, set shell=False.

On 04/10/2018 09:19 PM, Patrick Palczewski wrote:
> Patrick Palczewski <psykiatris@gmail.com> added the comment:
>
> Final report and recommendation:
>
> 1. If shell-True, subprocess will execute /bin/bash. Code works if an
> executable shell script and arguments are provided.
>
> 2. it is better to pass arguments in as a list. Example: cmd=['ping',
> '8.8.8.8;, '-c 10']. If you do this, you do not need to specify an
> executable= setting.
>
> 3. p.communicate() closes the stdin, stdout, stderr streams, collects
> all input for output. Inserting 10 newlines (\n) has no effect. It is
> appropriate to leave it empty, or use None.
>
> 4. The only way text can be inserted into the stdin is if the external
> program has a function to do the following:
> sys.stdout.write(sys.stdin.read(). This can be done internally with
> Jython and Python code.
>
> I've attached the updated tnsping.py scrpt. My previous patches were
> poorly thought out and will not work. My apologies.
>
> Recommendation: Mark this issue as invalid as the code works with no
> errors with the minor changes that were made.
>
> On 04/07/2018 09:23 AM, Patrick Palczewski wrote:
>> Patrick Palczewski <psykiatris@gmail.com> added the comment:
>>
>> Yes, I saw in the documentation after I posted. It was pretty late. :/
>>
>>
> Added file: http://bugs.jython.org/file1623/unnamed
> Added file: http://bugs.jython.org/file1624/tnsping.py
>
> _______________________________________
> Jython tracker <report@bugs.jython.org>
> <http://bugs.jython.org/issue2664>
> _______________________________________
Files
File name Uploaded
unnamed psykiatris, 2018-04-11.04:27:33
History
Date User Action Args
2018-04-11 04:27:34psykiatrissetrecipients: + psykiatris, jeff.allen, mga792
2018-04-11 04:27:34psykiatrislinkissue2664 messages
2018-04-11 04:27:34psykiatriscreate