<div dir="ltr">So I figured it out and verified with ps auxwww | grep aed.<div><br></div><div>It now shows &#39;./aed -e -p ****&#39;</div><div><br></div><div>The problem I have is when I pipe to another instance it breaks that instance and I can&#39;t figure out why. When I redirect to files and output/readin files it works fine. Something with the pipe and modifying argv. Any ideas</div>

<div><br></div><div>my code is only executed when getopt sees the &#39;p&#39; parameter set...</div><div><br></div><div>strncpy(argv[optind-1],STARS,strlen(argv[optind-1]));</div><div><br></div><div>Which replaces the passphrase with asterisks</div>
<div><br></div><div>i.e. </div><div>
<br></div><div>./aed -e -p Tejas &lt;file | ./aed -d p Tejas - WORKS</div><div><br></div><div>./aed -e &lt; | ./aed -d -p Tejas - DOES NOT WORK. Prompts for passphrase and I enter but get encrypted text back</div><div><br>
</div><div>./aed -e -p Tejas &lt;file | ./aed -d  - Prompts me for passphrase but when I enter it, I get encrypted text back.</div><div><br></div><div>./aed -e &lt;file | ./aed -d - WORKS</div><div><br></div><div>If I remove the strncpy, all conditions work. Also like I mentioned, working with files works always.</div>
<div><br></div><div><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Dec 7, 2013 at 8:11 PM, Jan Schaumann <span dir="ltr">&lt;<a href="mailto:jschauma@stevens.edu" target="_blank">jschauma@stevens.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Tejas Nadkarni &lt;<a href="mailto:tnadkarn@stevens.edu">tnadkarn@stevens.edu</a>&gt; wrote:<br>
&gt; I modified the contents of argv for the entry relating to the passphrase, I<br>
&gt; printed it before the change and after the change and so I know I modified<br>
&gt; it. However, when I run &#39;ps aux | grep aed&#39; I still see the original<br>
&gt; passphrase and not what I modified. Is there another step to refresh the<br>
&gt; process entry??<br>
<br>
</div>Post your code.<br>
<br>
If you manipulated the right pointer (and not a copy of it), then that<br>
should be sufficient.<br>
<div class="HOEnZb"><div class="h5"><br>
-Jan<br>
_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
</div></div></blockquote></div><br></div>