# Finagle

An extensible, fault-tolerant RPC system for the JVM for building high-concurrency servers.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## The End of the Public API Strangler

DevFeed: [The End of the Public API Strangler](<https://devfeed.tech/articles/the-end-of-the-public-api-strangler-2030.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//end-of-the-strangler>)

Published: 2022-03-14T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [BFF](<https://devfeed.tech/topics/bff.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [Scala](<https://devfeed.tech/topics/scala.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [bff](<https://devfeed.tech/tags/bff.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [finagle](<https://devfeed.tech/tags/finagle.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [scala](<https://devfeed.tech/tags/scala.md>)

### AI overview

SoundCloud describes an eight-year migration of its public API from a monolithic Ruby on Rails application to a BFF using the Strangler pattern. The approach introduced a Scala service built with Finagle to proxy and augment API responses while functionality moved across microservices.

### Source excerpt

This is the story of how we used the Strangler pattern to migrate our public API from a monolithic codebase to a fully fledged BFF over the...

## Did I Break You? Reverse Dependency Verification

DevFeed: [Did I Break You? Reverse Dependency Verification](<https://devfeed.tech/articles/did-i-break-you-reverse-dependency-verification-2028.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//did-i-break-you>)

Published: 2021-05-25T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Reverse Dependencies](<https://devfeed.tech/topics/reverse-dependencies.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>), [Data Science](<https://devfeed.tech/topics/data-science.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [PWA](<https://devfeed.tech/topics/pwa.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [automation](<https://devfeed.tech/tags/automation.md>), [backend](<https://devfeed.tech/tags/backend.md>), [collaboration](<https://devfeed.tech/tags/collaboration.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [framework](<https://devfeed.tech/tags/framework.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [rails](<https://devfeed.tech/tags/rails.md>), [reverse-dependencies](<https://devfeed.tech/tags/reverse-dependencies.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [tech-stack](<https://devfeed.tech/tags/tech-stack.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tooling](<https://devfeed.tech/tags/tooling.md>), [verification](<https://devfeed.tech/tags/verification.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

SoundCloud describes how its evolving technology stack and team autonomy created fragmentation across languages, frameworks, processes, and documentation. It presents Golden Paths as opinionated, reusable recommendations that simplify development while preserving flexibility, including a JVM backend path built around Finagle and supporting tooling.

### Source excerpt

SoundCloud was founded 13 years ago, and throughout its history, the company and much of its tech stack has changed. We started with a...

## Announcing Twinagle: Twirp and Protobuf for Finagle

DevFeed: [Announcing Twinagle: Twirp and Protobuf for Finagle](<https://devfeed.tech/articles/announcing-twinagle-twirp-and-protobuf-for-finagle-1988.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//announcing-twinagle>)

Published: 2020-06-12T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Twirp](<https://devfeed.tech/topics/twirp.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [Go](<https://devfeed.tech/topics/go.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [JSON](<https://devfeed.tech/topics/json.md>), [API](<https://devfeed.tech/topics/api.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>)

Tags: [announcements](<https://devfeed.tech/tags/announcements.md>), [backend](<https://devfeed.tech/tags/backend.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [finagle](<https://devfeed.tech/tags/finagle.md>), [go](<https://devfeed.tech/tags/go.md>), [http](<https://devfeed.tech/tags/http.md>), [json](<https://devfeed.tech/tags/json.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rest](<https://devfeed.tech/tags/rest.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [scala](<https://devfeed.tech/tags/scala.md>), [twirp](<https://devfeed.tech/tags/twirp.md>)

### AI overview

SoundCloud announces Twinagle, an open source implementation of the Twirp protocol for Scala/Finagle. The article explains how Twirp and Protocol Buffers can replace more flexible HTTP and JSON conventions with standardized RPC contracts, reducing API inconsistencies and potentially improving performance and development speed.

### Source excerpt

A previous post on this blog ended with the following paragraph: "We might also replace JSON with a more efficient serialization protocol...

## Time Travel with JVM

DevFeed: [Time Travel with JVM](<https://devfeed.tech/articles/time-travel-with-jvm-24838.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/2/23/time-travel-jvm>)

Author: Alimate

Published: 2020-02-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [object](<https://devfeed.tech/tags/object.md>), [process](<https://devfeed.tech/tags/process.md>)

### AI overview

This article demonstrates how a Java object can be allocated without calling its constructor. It explains that the object receives default field values during JVM initialization, while constructor-based initialization is skipped, and cautions against using the demonstrated approach.

### Source excerpt

Let's allocate a Java object without calling its constructor!

## Tracing High Volume Services

DevFeed: [Tracing High Volume Services](<https://devfeed.tech/articles/tracing-high-volume-services-26520.md>)

Original publisher: [Read original article](<http://engineering.curalate.com/2017/09/26/tracing-services.html>)

Author: Anton Kropp was a Software Engineer

Published: 2017-09-26T12:11:36Z

Content type: article

Language: en

Sources: [Curalate](<https://devfeed.tech/sources/curalate.md>)

Topics: [tracing](<https://devfeed.tech/topics/tracing.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Logging and metrics](<https://devfeed.tech/topics/logging-and-metrics.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [debugging](<https://devfeed.tech/tags/debugging.md>), [devops](<https://devfeed.tech/tags/devops.md>), [finagle](<https://devfeed.tech/tags/finagle.md>), [http](<https://devfeed.tech/tags/http.md>), [logging](<https://devfeed.tech/tags/logging.md>), [logging-and-metrics](<https://devfeed.tech/tags/logging-and-metrics.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [scala](<https://devfeed.tech/tags/scala.md>), [services](<https://devfeed.tech/tags/services.md>), [soa](<https://devfeed.tech/tags/soa.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

### AI overview

The article explains how to trace requests across a high-volume service ecosystem by propagating a trace identifier through service calls and including it in logs. It describes Curalate's use of Finagle and custom OkHttp interceptors to place the identifier in HTTP headers, then reuse it in logging contexts and structured JSON logs.

### Source excerpt

We like to think that building a service ecosystem is like stacking building blocks. You start with a function in your code. That function is hosted in a class. That class in a service. That service is hosted in a cluster. That cluster in a region. That region in a data center, etc. At each level there's a myriad of challenges. From the start, developers tend to use things like logging and metrics to debug their systems, but a certain class of problems crops up when you need to debug across services. From a debugging perspective, you'd like to have a higher projection of the view of the system: a linearized view of what requests are doing. I.e. You want to be able to see that service A called service B and service C called service D at the granularity of single requests. Cross Service Logging The simplest solution to this is to require that every call from service to service comes with some sort of trace identifier. Incoming requests into the system, either from public API's or client side requests, or even from async daemon invoked timers/schedules/etc generates a trace. This trace then gets propagated through the entire system. If you use this trace in all your log statements you can now correlate cross service calls. How is this accomplished at Curalate? For the most part we use Finagle based services and the Twitter ecosystem has done a good job of providing the concept of a thread local TraceId and automatically propagating it to all other twitter-* components (yet another reason we like Finatra!). All of our service clients automatically pull this thread local trace id out and populate a known HTTP header field that services then pick up and re-assume. For Finagle based clients this is auto-magick'd for you. For other clients that we use, like OkHttp, we had to add custom interceptors that pulled the trace from the thread local and set it on the request. Here is an example of the header being sent automatically as part of Zipkin based headers (which we re-use

## Inside a SoundCloud Microservice

DevFeed: [Inside a SoundCloud Microservice](<https://devfeed.tech/articles/inside-a-soundcloud-microservice-2056.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//inside-a-soundcloud-microservice>)

Published: 2017-07-28T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Microservice](<https://devfeed.tech/topics/microservice.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [Scala](<https://devfeed.tech/topics/scala.md>), [API](<https://devfeed.tech/topics/api.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Network](<https://devfeed.tech/topics/network.md>), [RSS Feed](<https://devfeed.tech/topics/rss-feed.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>), [Messaging](<https://devfeed.tech/topics/messaging.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [backend](<https://devfeed.tech/tags/backend.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [finagle](<https://devfeed.tech/tags/finagle.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [json](<https://devfeed.tech/tags/json.md>), [messaging](<https://devfeed.tech/tags/messaging.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [microservices-architecture](<https://devfeed.tech/tags/microservices-architecture.md>), [network](<https://devfeed.tech/tags/network.md>), [rss](<https://devfeed.tech/tags/rss.md>), [scala](<https://devfeed.tech/tags/scala.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>)

### AI overview

The article describes SoundCloud's transition from a monolithic backend to independently built and deployed microservices. It explains how the Creators Team implements services in Scala with Finagle, shared libraries, APIs, JSON or Thrift communication, configuration injection, telemetry, and service-to-service request aggregation.

### Source excerpt

If you're a regular visitor to this blog, you might be aware that we have been transitioning to a microservices based architecture over the past four to five years, as we have shared insights into the process and the related challenges on multiple occasions. To recap, adopting a microservices architecture has allowed us to regain team autonomy by breaking up our monolithic backend into dozens of decoupled services, each encapsulating a well defined portion of our product domain. Every service is built and deployed individually, communicating with other services over the network via light-weight data interchange formats such as JSON or Thrift. What we haven't touched on so far is how a microservice at SoundCloud looks backstage.

## Microservices and the monolith

DevFeed: [Microservices and the monolith](<https://devfeed.tech/articles/microservices-and-the-monolith-2081.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//microservices-and-the-monolith>)

Published: 2016-08-26T00:00:00Z

Content type: opinion

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [microservices architecture](<https://devfeed.tech/topics/microservices-architecture.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Prometheus](<https://devfeed.tech/topics/prometheus.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [docker](<https://devfeed.tech/tags/docker.md>), [finagle](<https://devfeed.tech/tags/finagle.md>), [http](<https://devfeed.tech/tags/http.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [microservices-architecture](<https://devfeed.tech/tags/microservices-architecture.md>), [monolithic-architecture](<https://devfeed.tech/tags/monolithic-architecture.md>), [prometheus](<https://devfeed.tech/tags/prometheus.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

SoundCloud reviews its migration from a monolithic architecture to microservices and evaluates the strategy needed to decommission the monolith. The article reports that internal tools and libraries improved service creation and engineering productivity, while extraction projects remained difficult because they took months and depended on multiple teams.

### Source excerpt

In a previous series of blog posts, we covered our decision to move away from a monolithic architecture, replacing it with microservices, interacting synchronously with each other over HTTP, and asynchronously using events. In this post, we review our progress toward this goal, and talk about the conditions and strategy required to decommission our monolith.

## Synchronous communication for microservices: current status and learnings

DevFeed: [Synchronous communication for microservices: current status and learnings](<https://devfeed.tech/articles/synchronous-communication-for-microservices-current-status-and-learnings-2162.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//synchronous-communication-for-microservices-current-status-and-learnings>)

Published: 2016-07-27T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Microservice](<https://devfeed.tech/topics/microservice.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Scala](<https://devfeed.tech/topics/scala.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Netty](<https://devfeed.tech/topics/netty.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [Prometheus](<https://devfeed.tech/topics/prometheus.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [finagle](<https://devfeed.tech/tags/finagle.md>), [framework](<https://devfeed.tech/tags/framework.md>), [http](<https://devfeed.tech/tags/http.md>), [json](<https://devfeed.tech/tags/json.md>), [library](<https://devfeed.tech/tags/library.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [microservices-architecture](<https://devfeed.tech/tags/microservices-architecture.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [programming](<https://devfeed.tech/tags/programming.md>), [prometheus](<https://devfeed.tech/tags/prometheus.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [scala](<https://devfeed.tech/tags/scala.md>), [scalability](<https://devfeed.tech/tags/scalability.md>)

### AI overview

This article describes SoundCloud's use of synchronous request-response communication in a microservices architecture. It discusses Finagle and Scala-based services, the internal jvmkit library, non-blocking I/O, service discovery, routing, logging, Prometheus integration, and the use of HTTP/1.1 with JSON. It also explains the interoperability and debugging benefits of HTTP and JSON, along with their greater overhead compared with more optimized protocols.

### Source excerpt

Since we started breaking our monolith and introduced a microservices architecture we rely a lot on synchronous request-response style communication. In this blog post we'll go over our current status and some of the lessons we learned.

## Building Products at SoundCloud--Part III: Microservices in Scala and Finagle

DevFeed: [Building Products at SoundCloud--Part III: Microservices in Scala and Finagle](<https://devfeed.tech/articles/building-products-at-soundcloud-part-iii-microservices-in-scala-and-finagle-2004.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//building-products-at-soundcloud-part-3-microservices-in-scala-and-finagle>)

Published: 2014-06-13T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Finagle](<https://devfeed.tech/topics/finagle.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [finagle](<https://devfeed.tech/tags/finagle.md>), [http](<https://devfeed.tech/tags/http.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [resilience](<https://devfeed.tech/tags/resilience.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [scala](<https://devfeed.tech/tags/scala.md>)

### AI overview

SoundCloud describes its move from a Ruby on Rails monolith to microservices, consolidation around JVM languages, and evaluation of Netty, Netflix, and Finagle stacks for RPC, resilience, and concurrency.

### Source excerpt

In the first two parts of this series, we talked about how SoundCloud started breaking away from a monolithic Ruby on Rails application into...

## 100,000 strong - CodeFactory server

DevFeed: [100,000 strong - CodeFactory server](<https://devfeed.tech/articles/100-000-strong-codefactory-server-19977.md>)

Original publisher: [Read original article](<http://engineering.hackerearth.com/2013/03/12/100000-strong/>)

Published: 2013-03-12T00:00:00Z

Content type: article

Language: en

Sources: [HackerEarth](<https://devfeed.tech/sources/hackerearth.md>)

Topics: [C](<https://devfeed.tech/topics/c.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Java](<https://devfeed.tech/topics/java.md>), [Finagle](<https://devfeed.tech/topics/finagle.md>), [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [servers](<https://devfeed.tech/topics/servers.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [development](<https://devfeed.tech/tags/development.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [ipc](<https://devfeed.tech/tags/ipc.md>), [java](<https://devfeed.tech/tags/java.md>), [process](<https://devfeed.tech/tags/process.md>), [server](<https://devfeed.tech/tags/server.md>)

### AI overview

This article recounts the development of HackerEarth's CodeFactory server. It describes an early C-based code checker that compiled and ran C, C++, and Java programs, including process execution, inter-process communication, privilege limitations, and retry handling on a shared server. The article then explains the adoption of Apache Thrift and the implementation of a client-server architecture for distributed, cross-language services, followed by expansion of the evaluation engine to languages such as Perl, PHP, Python, Ruby, and Haskell.

### Source excerpt

The Inception January 2012 was an idyllic time for us. Three of us had just teamed up to build something cool. There was no planning for the future, no sort of agreement - we were just three geeks sitting in the dorm room who wanted to build a product. We started working on MyCareerStack where there was supposed to be interview questions, tutorials etc. Soon, we realized that there was code editor needed, but that was easy. The harder part was that people don't only want to write code online, they want to run them. Now that I had never done before! What resulted then was a hacky few hundred lines of code in C, which could compile and run code in just C, C++ and Java. It might have been even the worst piece of code I had ever written, but it worked and it was sweet! /* create FIFO to be used here & later for IPC. */ char fifo_1[NAME_MAX]; createFilePath(fifo_1, id, dir, FIFO_FILE_1); umask(0); /* reset file creation mask. */ int readfd_1, writefd_1, readfd_2; if (mkfifo(fifo_1, S_IRWXU | S_IRWXG | S_IRWXO) < 0) err(1, NULL); /* Fork a child to exec the process: {id}_a.out */ pid_t pid; int status; signal(SIGALRM, handle_tle); /* change current working directory to mycareerstack */ chdir(RUNTIME_DIR); Wait, you haven't seen the ugly part yet! This will make you cringe, it made me too. See what the hell I am doing with re-tries, but it was required! int tries = 0; /* try the exec 100 times. */ while(tries < 100) { /* run the program. */ if(execl(executable, executable, (char*) 0) < 0) { // } ++tries; } printf("Couldn't run the program!"); _exit(0); There were some serious reasons for which this hack was done. We were hosted on a shared webfaction server, with no access to root. This meant I couldn't drop the user process privilege to any user with limited access permissions. I needed to create another user then with limited access which could be controlled by the original user. And again, I didn't know of any way to know if there is already a process running with privi