Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdmd: Use execv on supported systems #112

Merged
1 commit merged into from
Feb 2, 2014
Merged

Conversation

CyberShadow
Copy link
Member

{
import std.c.process;
auto argv = args.map!toStringz.chain(null.only).array;
return execv(argv[0], argv.ptr);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity:

return execv(argv[0].ptr, argv.ptr);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

argv[0] is a pointer, and pointers don't have a .ptr property.

rdmd.d(510): Error: no property 'ptr' for type 'immutable(char)*'

@ghost
Copy link

ghost commented Feb 2, 2014

LGTM. only is proving its usefulness, I've used it quite a bit myself too.

ghost pushed a commit that referenced this pull request Feb 2, 2014
rdmd: Use execv on supported systems
@ghost ghost merged commit 062e91a into dlang:master Feb 2, 2014
@ghost
Copy link

ghost commented Feb 2, 2014

P.S. Can we add a test for 11983 to the RDMD test suite?

@CyberShadow
Copy link
Member Author

Ah bugger, this broke --dry-run. Should've run the test suite! >_<

I'll fix that and add a test for this.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants