Skip to content

Instantly share code, notes, and snippets.

@meeech
Created December 1, 2011 04:54
Show Gist options
  • Save meeech/1413770 to your computer and use it in GitHub Desktop.
Save meeech/1413770 to your computer and use it in GitHub Desktop.
Titanium Desktop 1.2.0RC6 + Lion - Process Warnings
//Using 1.2.0RC6e / Lion
var test= Titanium.Process.createProcess({
args: ['ls', '/Users'],
env: {'PATH': '/bin'}
});
test.setOnReadLine(function(data){
console.log('Test2: '+data.toString());
});
test.launch();
/*
I end up with a lot of this being output from setOnReadLine. Used to be fine under 1.1/10.6
[04:22:04:407] [Titanium.API] [Information] Test2: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
[04:22:04:415] [Titanium.API] [Information] Test2: Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
[04:22:04:415] [Titanium.API] [Information] Test2: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
[04:22:04:415] [Titanium.API] [Information] Test2: Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
[04:22:04:415] [Titanium.API] [Information] Test2: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
[04:22:04:415] [Titanium.API] [Information] Test2: Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
[04:22:04:415] [Titanium.API] [Information] Test2: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
[04:22:04:415] [Titanium.API] [Information] Test2: Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
[04:22:04:415] [Titanium.API] [Information] Test2: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
[04:22:04:415] [Titanium.API] [Information] Test2: Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
[04:22:04:416] [Titanium.API] [Information] Test2: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
[04:22:04:416] [Titanium.API] [Information] Test2: Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
*/
@stefancrain
Copy link

//Using 1.2.0RC5 / Lion

var test= Titanium.Process.createProcess({
   args: ['ls', '/Users']
});
test.setOnReadLine(function(data){
   console.log('Test2: '+data.toString());
});
test.launch(); 

[14:17:39:459] [Titanium.API] [Information] Test2: Shared
[14:17:39:459] [Titanium.API] [Information] Test2: admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment