# How to ignore terminated process in pmap with no retry

**URL:** https://discourse.julialang.org/t/how-to-ignore-terminated-process-in-pmap-with-no-retry/31578
**Category:** General Usage
**Created:** [November 27, 2019, 1:58pm UTC](https://discourse.julialang.org/t/how-to-ignore-terminated-process-in-pmap-with-no-retry/31578 "2019-11-27T13:58:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![altre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/altre/32/17036_2.png) [@altre](https://discourse.julialang.org/u/altre)
#### Post date: [November 27, 2019, 1:58pm UTC](https://discourse.julialang.org/t/how-to-ignore-terminated-process-in-pmap-with-no-retry/31578/1 "2019-11-27T13:58:08Z")

</div>

When a worker process in `pmap` gets killed, the parent worker aborts with a `ProcessExitedException`. Is there any way to prevent this? [Fault tolerant `pmap` when worker goes down](https://discourse.julialang.org/t/fault-tolerant-pmap-when-worker-goes-down/21648) shows that it works when you specify a retry delay, but I don’t want to retry.  
Example:

```julia
using Distributed
addprocs(2)

@everywhere function foo(i)
    if myid() == 2
        exit(1) 
        # throw(ErrorException()) # works as expected
    end
    sleep(2)
    "jipeee"
end
pmap(foo, 1:3, on_error=x->-1)
# Worker 2 terminated.ERROR: 
# ProcessExitedException(2)
# Stacktrace:
# ...

# This works, but we don't want to retry:
# pmap(foo, 1:3, on_error=x->-1, retry_delays=zeros(3))

```
