anjuta_utils little fix

View: New views
5 Messages — Rating Filter:   Alert me  

anjuta_utils little fix

by Massimo Cora' :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

attached is a patch that fixes a little memleak.
I was wondering if AnjutaLauncher, which calls
anjuta_util_parse_args_from_string (), is able to execute something like

/usr/bin/my_foo_prg --args par1 > /tmp/my_foo_output

It would be really useful..
thanks,
Massimo


Index: ChangeLog
===================================================================
--- ChangeLog (revision 4028)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2008-06-19  Massimo Cora'  <maxcvs@...>
+
+ * libanjuta/anjuta-utils.c (anjuta_util_parse_args_from_string):
+ Fixed little mem-leak.
+
 2008-06-17  Sébastien Granjoux  <seb.sfo@...>
 
  * plugins/document-manager/anjuta-docman.c:
Index: libanjuta/anjuta-utils.c
===================================================================
--- libanjuta/anjuta-utils.c (revision 4028)
+++ libanjuta/anjuta-utils.c (working copy)
@@ -995,6 +995,7 @@
  if (is_quote) {
  g_warning ("Unclosed quotation encountered at the end of parsing");
  }
+ g_free (buffer);
  return args;
 }
 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Anjuta-devel mailing list
Anjuta-devel@...
https://lists.sourceforge.net/lists/listinfo/anjuta-devel

Re: anjuta_utils little fix

by Johannes Schmid-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!


> /usr/bin/my_foo_prg --args par1 > /tmp/my_foo_output

That does not work as there is no shell and thus the > operator cannot
be used. What probably works (untested is)

/bin/sh "/usr/bin/my_foo_prg --args par1 > /tmp/my_foo_output"

Though I don't see a real reason to do this.

Regards,
Johannes


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Anjuta-devel mailing list
Anjuta-devel@...
https://lists.sourceforge.net/lists/listinfo/anjuta-devel

signature.asc (196 bytes) Download Attachment

Re: anjuta_utils little fix

by Massimo Cora' :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Johannes,

Johannes Schmid wrote:

> Hi!
>
>
>> /usr/bin/my_foo_prg --args par1 > /tmp/my_foo_output
>
> That does not work as there is no shell and thus the > operator cannot
> be used. What probably works (untested is)
>
> /bin/sh "/usr/bin/my_foo_prg --args par1 > /tmp/my_foo_output"
>
> Though I don't see a real reason to do this.
>

well I had a doubt whether the output of an AnjutaLauncher process could
come after the child-exit signal or not. If that's the case it would be
better to have the output fixed on a tmp file.
Anyway I'm assuming now that child-exit comes only after all its output
has been got.

regards,
Massimo


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Anjuta-devel mailing list
Anjuta-devel@...
https://lists.sourceforge.net/lists/listinfo/anjuta-devel

Re: anjuta_utils little fix

by Johannes Schmid-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

> well I had a doubt whether the output of an AnjutaLauncher process could
> come after the child-exit signal or not. If that's the case it would be
> better to have the output fixed on a tmp file.
> Anyway I'm assuming now that child-exit comes only after all its output
> has been got.

"child-exit" should be the last - I think all buffers are flushed
before.

Regards,
Johannes


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Anjuta-devel mailing list
Anjuta-devel@...
https://lists.sourceforge.net/lists/listinfo/anjuta-devel

signature.asc (196 bytes) Download Attachment

Re: anjuta_utils little fix

by Naba Kumar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Massimo,

On Thu, 2008-06-19 at 00:18 +0200, Massimo Cora' wrote:
> I was wondering if AnjutaLauncher, which calls
> anjuta_util_parse_args_from_string (), is able to execute something like
>
> /usr/bin/my_foo_prg --args par1 > /tmp/my_foo_output
>
If you are not interested in output of a command execution, such as in
this case, using system() or execlp() is much more appropriate.

Thanks.

Regards,
-Naba



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Anjuta-devel mailing list
Anjuta-devel@...
https://lists.sourceforge.net/lists/listinfo/anjuta-devel