Skip to content

IllegalStateException #1

@wbasterfield

Description

@wbasterfield

Hi there

Busy testing your library and I'm getting an IllegalStateException.

Here is the test code

public static void main(String[] args)
{
Vertx v = Vertx.vertx();
Process process = Process.spawn(v, "ls");
process.stdout().handler(buff -> {
System.out.println("STD "+buff.toString());
});
process.stderr().handler(buff -> {
System.out.println("Error "+ buff.toString());
});
process.exitHandler(code -> {
System.out.println("Child process exited with code: " + code);
v.close();
});
process.start();
/*
try
{
process.start();
}catch(Exception ex) {}*/
}

Here is the exception

Exception in thread "main" java.lang.IllegalStateException
at com.julienviet.childprocess.impl.ProcessImpl.start(ProcessImpl.java:72)
at com.julienviet.childprocess.impl.ProcessImpl.start(ProcessImpl.java:66)
at ztest.start.main(start.java:24)

Everything does what its supposed to do so thats all good, we get the directory listing and exit no problems, so I'm not sure why the start method is generating an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions