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

Feature/runtime exec #21

Merged
merged 30 commits into from May 29, 2020
Merged

Feature/runtime exec #21

merged 30 commits into from May 29, 2020

Conversation

ricardobna
Copy link
Collaborator

@ricardobna ricardobna commented Apr 29, 2020

Exec method for Runtime class done.

@ricardobna ricardobna requested a review from italoyeltsin2 Apr 29, 2020
@ricardobna ricardobna added the feature New feature or request label Apr 29, 2020
@ricardobna ricardobna linked an issue Apr 29, 2020 that may be closed by this pull request
@ItaloYeltsin
Copy link
Contributor

@ItaloYeltsin ItaloYeltsin commented May 14, 2020

It is missing license in all new files

Copy link
Contributor

@ItaloYeltsin ItaloYeltsin left a comment

Is this legal? we have a package starting with java.nio.*

@ItaloYeltsin
Copy link
Contributor

@ItaloYeltsin ItaloYeltsin commented May 18, 2020

@flsobral

@ricardobna made some changes, could you review them?

Copy link
Member

@flsobral flsobral left a comment

check my comments

TotalCrossVM/src/nm/instancefields.h Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/NativeMethods.txt Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/NativeMethodsPrototypes.txt Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/NativeMethods.h Outdated Show resolved Hide resolved
TotalCrossVM/src/init/nativeProcAddressesTC.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/lang/Runtime.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/nio/channels/FileChannelImpl.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/nio/channels/FileChannelImpl.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/nio/channels/FileChannelImpl.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/lang/Runtime.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/lang/Runtime.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/lang/Runtime.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/lang/Runtime.c Outdated Show resolved Hide resolved
TotalCrossVM/src/nm/lang/Runtime.c Outdated Show resolved Hide resolved
@flsobral flsobral requested review from ItaloYeltsin and removed request for italoyeltsin2 May 19, 2020
@ItaloYeltsin ItaloYeltsin merged commit 54398a9 into develop May 29, 2020
@ItaloYeltsin ItaloYeltsin deleted the feature/runtime-exec branch May 29, 2020
flsobral added a commit that referenced this issue Jul 16, 2020
* Adding Runtime.exec

Adding Runtime and Proccess on Java side and Runtime and cpproc on c side, cpproc is responsible to execute the command and Runtime is responsible to make the Streams and make the Proccess to be returned.

* FileInputChannel implementation

* Creating FileInputStream and and returning the Proccess with it

* Fixing stream to use byte array instead of ByteBuffer on java side

* Binding OutputStream and ErrorStream

* Set file descriptors to the value returned from cpproc_forkAndExec

* OutputStream and ErrorStream

* Calling cpproc_forAndExec with correct values

* Fixing malloc and strings

* Testing with filePath NULL

* Runtime.exec working without path.

* Updating Runtime interface and adding filePath to Runtime.c

* Forgotten chdir

* Adding exitValue, waitFor and destroy.

* Changing memory allocation to heap on Runtime and fixing some exceptions

This change was made so It's easier to deallocate the char pointers used to pass the command, path and environment  arrays to cpproc_forkAndExec

Co-authored-by: flsobral <flsobral@gmail.com>

* Adding exception to reads with error value on return and changing byteBuffer to byteArray for better readability

* Adding exception to windows, android and iOS and adding the file to CMakeLists on android

Co-authored-by: Allan C <acmlira@gmail.com>
Co-authored-by: flsobral <flsobral@gmail.com>
flsobral added a commit that referenced this issue Jul 24, 2020
* Adding Runtime.exec

Adding Runtime and Proccess on Java side and Runtime and cpproc on c side, cpproc is responsible to execute the command and Runtime is responsible to make the Streams and make the Proccess to be returned.

* FileInputChannel implementation

* Creating FileInputStream and and returning the Proccess with it

* Fixing stream to use byte array instead of ByteBuffer on java side

* Binding OutputStream and ErrorStream

* Set file descriptors to the value returned from cpproc_forkAndExec

* OutputStream and ErrorStream

* Calling cpproc_forAndExec with correct values

* Fixing malloc and strings

* Testing with filePath NULL

* Runtime.exec working without path.

* Updating Runtime interface and adding filePath to Runtime.c

* Forgotten chdir

* Adding exitValue, waitFor and destroy.

* Changing memory allocation to heap on Runtime and fixing some exceptions

This change was made so It's easier to deallocate the char pointers used to pass the command, path and environment  arrays to cpproc_forkAndExec

Co-authored-by: flsobral <flsobral@gmail.com>

* Adding exception to reads with error value on return and changing byteBuffer to byteArray for better readability

* Adding exception to windows, android and iOS and adding the file to CMakeLists on android

Co-authored-by: Allan C <acmlira@gmail.com>
Co-authored-by: flsobral <flsobral@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants